-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hacker's question #88
Comments
Not sure I understand what you're asking. |
Why is there a command to interrogate the slave for its address when in order to interrogate a slave, its address must already be known? |
I guess it's because you can add N number of nodes with different IDs , and you don't need to change the main code if you do so. That's why it's "searching" for nodes in the BUS. |
Then I must not understand I2C. Can an I2C slave respond to packets that do not know its address? I find "general call" googling, but don't see how it could be employed in any scanning process. If you need to know the adderss of a slave to talk to it, why would one of the things you can ask it be its address? I anticipate again being not understood, so another anaolgy: call 1-800-555-1212 and ask then what number you dialed. You already know! a7 |
Here's an interesting reading. https://howtomechatronics.com/tutorials/arduino/how-i2c-communication-works-and-how-to-use-it-with-arduino/ But long story short, you need to know the address of the device in order to comunicate with it. Imagine you add N numbers of nodes, each an everyone with a different address, if you don't have a way of finding them automatically then you'd have to enter each an everyone by hand so that the software recognizes them.
|
Thank you. The READ_ADDRESS command appears to only be used to see if the device is there. Any other command would have sufficed. By either succeeding or failing the presence of a node can be determined. Or I am still missing something - is there anything about READ_ADDRESS that makes it uniquely work for detecting? The "report your own address" feature of a device that must be addressed to get a report seems odd. a7 |
I am delighted to find this excellent project.
In delta5node.ino it looks like there is a hard-coded i2cSlaveAddress. This is used for wire initialization, it is also printed for our convenience.
But there is also a mechanism for the master controller to interrogate the slave nodes for that address… but to do this, the address would already be known.
Car 54, what is your car number?
Or I am missing something probably. Is there a kind of master broadcast that is used to find all slaves?
alto777
The text was updated successfully, but these errors were encountered: