Difference between revisions of "Team:Aachen/Notebook/Construction Manuals/Communication Protocol"
(→Slave to Slave) |
|||
Line 14: | Line 14: | ||
The communication system we invented works in principle as shown above. Every rector must be able to communicate with two others, so we use the normal serial port and the SoftwareSerial library to establish another serial connection via two digital pins. In our program we use pin 5 as receiver and pin 8 as transmitter. The first reactor is connected as usual to the computer with the USB port. Now, to connect a second reactor to this one, we connect pin 5 of the first with pin 0 (the TX pin) of the second and pin 8 with pin 1 (RX pin). | The communication system we invented works in principle as shown above. Every rector must be able to communicate with two others, so we use the normal serial port and the SoftwareSerial library to establish another serial connection via two digital pins. In our program we use pin 5 as receiver and pin 8 as transmitter. The first reactor is connected as usual to the computer with the USB port. Now, to connect a second reactor to this one, we connect pin 5 of the first with pin 0 (the TX pin) of the second and pin 8 with pin 1 (RX pin). | ||
− | + | ||
If now a message reaches one reactor from direction of the MCP the reactor program checks if the receiver ID in the message matches with the reactor ID. If so, the rest of the message is evaluated and the program reacts. If not, the message is forwarded to the next "deeper" reactor. This one checks again for the receiver ID and so on, until the targeted reactor is reached. | If now a message reaches one reactor from direction of the MCP the reactor program checks if the receiver ID in the message matches with the reactor ID. If so, the rest of the message is evaluated and the program reacts. If not, the message is forwarded to the next "deeper" reactor. This one checks again for the receiver ID and so on, until the targeted reactor is reached. | ||
Revision as of 17:19, 18 September 2015