will be the other node's address; the one you'll be talking to.
4. Below these lines will be a section for defining the radio frequency of
your RFM69HCW board. Uncomment the line corresponding to your
board's frequency, and make sure the others are commented (have //
in front of them. If you forget it, the frequency is marked on the
bottom of your RFM69HCW board).
5. If you want to use encryption, change the
, and put a 16-character string of your choice into the
true
value. This key must be the same for all nodes on your
ENCRYPTKEY
network. Keep it a secret!
6. Finally, if you wish to use acknowledgements, set
If not, set it to
. Use the same setting for all your nodes.
false
Now upload the sketch to your FIRST node. Remember that you should set
the "Tools/Port" menu to the COM port you wrote down earlier for the
FIRST node, and if you're using a 3.3V Arduino Pro as we recommend, you
should set the "Tools/Board" menu to "Arduino Pro or Pro Mini" and
"Tools/Processor" to "ATmega328 (3.3V, 8MHz)"
Node 2
Time to modify the sketch for the SECOND node.
1. Go back up to the
#define MYNODEID
to 2. That will be this node's address.
2. Now look for the
#define TONODEID
1. That will be the other node's address; the one you'll be talking to.
See how we swapped the
MYNODEID
each node will send messages to the other one.
Upload the sketch to your SECOND node. Change the "Tools/Port" menu to
the second COM Port you wrote down from above, and upload. That's it,
we're done!
Load and Modify the Code
Copy the code from the below window into the Arduino IDE (be sure the
editing window is completely blank first). After you've installed the RFM69
library, you can also find this code in the Arduino IDE under "File /
Examples / RFM69 / SFE_RFM69HCW_example.ino". Don't forget to make
the changes mentioned above.
value to
#define ENCRYPT
to
USEACK
true
line, and change the number
line, and change the number to
and
numbers? This way
TONODEID
.
Page 14 of 19
Need help?
Do you have a question about the RFM69HCW and is the answer not in the manual?
Questions and answers