Before we start, here is a close up of the circuit board showing the prototyping area. This is where you can attach your sensors, buttons etc. For a tutorial on connecting sensors, see this blog post.
User Configuration
The first time you turn on your Wicked Node you should set the operating mode and node identifier. After that you can change these configuration parameters any time, but if you do nothing the Wicked Node will assume its previous settings still apply.
What is transmitted
The Node transmits one packet of 8 bytes each interval (or if a button is pressed in Asynch mode). Here is a sample packet: 73 0 0 76 66 5D 0 AC
Byte | Description |
---|---|
73 | Transmitter ID |
0 | Packet number (Least significant byte) |
0 | Packet number (Most significant byte) |
76 | Analog Sensor 1 value |
66 | Analog Sensor 2 value |
5D | Analog Sensor 3 value |
0 | Digital Sensor 1 count (not value) |
AC | CRC code |
The digital input still works in non-Asynch modes, but the button press will only be transmitted at the next interval. It will transmit the number of times the button was pressed since last transmission. This is useful to (for example) count how often a door is opened.
Operating Mode
When the Wicked node is powered on it goes through a configuration start-up sequence. The status LED will flash at 1Hz for up to 10 seconds indicating that it is ready to accept a new setting for operating mode. You indicate the setting you would like to apply by connecting jumper wires that correspond to your desired setting then holding down the push button until the LED stops flashing. The LED will remain off for two seconds and then flash a number of times to indicate the setting that has been applied. The possible settings are:
Jumper Setting | Description | # LED Blinks |
---|---|---|
ISP.3 = GND ISP.4 = OPEN |
Test – transmits packet once every 10 seconds. Do not use this mode in production. |
1 |
ISP.3 = GND ISP.4 = GND |
Medium Rate – transmits packet once every 10 minutes (* one minute) | 2 |
ISP.3 = OPEN ISP.4 = OPEN |
Low Rate – transmits packet once every hour (* ten minutes) | 3 |
ISP.3 = OPEN ISP.4 = GND |
Asynchronous – transmits packet on sensor 4’s negative edges | 4 |
* this was changed in the latest version of software
Here is the pinout for the ISP header. Pins 1 and 6 are labeled on the board:
Node Identifier
If you apply a setting for Operating Mode as described above, the next thing that will happen is that the LED will start double-flashing at 1Hz for up to 20 seconds. This indicates the Wicked Node is prepared to accept a new setting for its Node Identifier. Every Wicked Node comes pre-programmed with a hard-coded base address. The setting you apply in this configuration step lets you choose among the four possible addresses your Node is programmed with. You indicate the setting you would like to apply the same way as the operating mode, by connecting jumper wires that correspond to your desired setting then holding down the push button until the LED stops flashing. The LED will remain off for two seconds and then flash a number of times to indicate the setting that has been applied. The possible settings are:
Jumper Setting | Description | # LED Blinks |
---|---|---|
ISP.3 = OPEN ISP.4 = OPEN |
Node ID = Node Group ID #1 | 1 |
ISP.3 = OPEN ISP.4 = GND |
Node ID = Node Group ID #2 | 2 |
ISP.3 = GND ISP.4 = OPEN |
Node ID = Node Group ID #3 | 3 |
ISP.3 = GND ISP.4 = GND |
Node ID = Node Group ID #4 | 4 |
The Node IDs your Node comes programmed with depends on its Node ID Group. We currently have 16 Node Groups (supporting up to 64 different Node IDs). The available addresses by Node Group are as follows:
ID # Group # | #1 | #2 | #3 | #4 | #5 | #6 | #7 | #8 | #9 | #10 | #11 | #12 | #13 | #14 | #15 | #16 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
#1 | 15 | 23 | 27 | 29 | 30 | 39 | 43 | 45 | 46 | 51 | 53 | 54 | 57 | 58 | 60 | 71 |
#2 | 75 | 77 | 78 | 83 | 85 | 86 | 89 | 90 | 92 | 99 | 101 | 102 | 105 | 106 | 108 | 113 |
#3 | 114 | 116 | 120 | 135 | 139 | 141 | 142 | 147 | 149 | 150 | 153 | 154 | 156 | 163 | 165 | 166 |
#4 | 169 | 170 | 172 | 177 | 178 | 180 | 184 | 195 | 197 | 198 | 201 | 202 | 204 | 209 | 210 | 212 |
Arduino Library
We’ve provided a ready to use Arduino Library called WickedReceiver that will handle all the decoding of wireless data for you. You can download the library right here. Just unzip it and drop the WickedReceiver folder into your Arduino/libraries folder. You can see how to use the library by opening the NodeLogger sketch under the File => Examples => WickedReceiver in the Arduino menu. If you create a WickedReceiver object with no arguments, it will accept packets from any Wicked Node that happens to be transmitting within range. If you provide the object a valid Node ID, it will filter out packets that it receives that don’t match that Node ID. Our primary goal here was to make it simple for you to use, hiding a lot of the complicated stuff that it takes to get radios to talk reliably in the WickedReceiver object.
Programming
Please keep in mind that the Wicked Receiver Shield communicates with your Arduino using the Serial Port (UART). This is the same interface used by your PC to load new programs on the Arduino. That’s the reason that there is a wire that you use to connect from the Receiver Shield’s DIG pin to the Arduino’s Rx (DIG0) pin. When you want to program your Arduino, you will need to make sure to disconnect this wire so that your PC can upload a new program without interference from the Receiver Shield.
Node code
The source code for the node is here.
Example Uses
Check out this project using the Node and Receiver to check if the mailman has delivered mail.