- Design pattern
Since Serial1 would not work on Serial Monitor on Arduino, to make sure the pattern works as expected, “Serial” was used in programming. The expected result is that when “H” is entered, the blue led (ledPin), green led (green) and white led (white) quickly blink in order and then all light up. When “L” is entered, all three led light out.
Please click here to view the pattern.
2. Configure the radio
To make sure two radios can chat.
3. Program Arduino
This time “Serial1” is used to allow Arduino to receive commands from the radio. It is okay that we do not test it after uploading since we did it in step 1. If there is any problem, it should not be the code.
After this step, we successfully lit my Arduino led using coolterm in Jing’s laptop. We did not succeed in once. Please see analysis in the next paragraph “Problems and Findings”.
- The RX and GND should be plugged in the very left two holes of the breakout board as the photo shows.
- When a chat is successfully made, directly unplug the XBee from radio pad and plug it onto Arduino. There is no need to enter +++ again in coolterm.
- To make sure the command is delivered, use send string instead of directly typing it.
- Just send “H” or “L”, don’t go like “HHHHH” or “LLLL”.