send a message between two projects
Kai was using his own PC and arduino IDE serial monitor to send commands to LEDs. We decided to replace sender with Jun’s Arduino (Satshakit) as an assignment.
LED array
Satshakit
Wiring table
Satshakit | LED array bridge |
---|---|
TX | RX |
RX | TX |
VCC | VCC |
GND | GND |
The Arduino sketch on the Satshakit simply sends out the number of 0 to 3 every 1000ms.
Serial is received by the bridge then passed to each nodes with another serial protocol. Signal is broadcasted to all nodes. Each node has unique address, and identifies the signal that is sent to itself.
In program on LED array, each LEDs are instructed to blink once as it received any signal from bridge, then give another blink if the signal contains its own address.
At the first contact, LEDs were flashing randomly.
Waveform was showing the periodic signal has broken signals and random spikes occuring outside the periodic cycle of the signal.
We spent an hour to trace the problem, but in the end we figured out reset pin of the Arduino were connected to TX line that was causing continuous reboot of the Arduino.
After we fixed the circuit it worked as we expected.
Here are the waveform of successful communications.
Sending “3”.
Sending “2”.
Sending “1”.
Sending “0”.
Arduino sketch for satshakit
Program for LED array