Step 9: Make the Circuit
-Prepare the xbee breakout board (solder on the 2 rows of male headers and 2 rows of 2mm xbee female headers)
-Insert the xbee onto it.
-I'm using a servo motor shield from seeed studios, but I am sort of just using it as a perf board, but a convenient one because all the ground and power pins to my servo motor are already jumped together, with a screw terminal for the battery input. And ignore those wires hanging off the board - I had prefiously soldered on female header pins for another use of the board, so I removed them so I could use this here. I eventually clipped them off but you can see them in the pics.
-So if you have the servo shield, solder on the screw terminal; two rows of headers where the 6V and GND from the battery are connected. Solder on male headers so it will mount in your seeeduino (or arduino) mega. I'm using the seeeduino again because i had it around, and because it is smaller so it fits better into the skin tube (the protective outer layer).
Note: an arduino mega is necessary not because of the numbers of outputs but because the flash memory space in the arduino UNO is not large enough.
-jump xbee pin 1 (3.3Vin) to Arduino 3.3V pin (see red wire)
-jump xbee tx (pin 2) to Arduino RX (pin1) (see yellow wire)
-jump xbee ground (pin 10) to arduino gnd (see black wire)
-jump power from the 6V battery input to the Arduino VIN pin (green wire)
-Solder on wires from all the digital output pins (as many servos as you are using).
-place on the servo connectors (Red, black, white here) and insert the dOUT wires from arduino into the servo cables (white signal wire).
NOTE: if Arduino is to be housed in the frotnt of the snake, connect the pins low to high from arduino to the servos that are most close to the head to far away) . in other words: the first servo (as in when the snake is moving ahead, the servo at the HEAD) should be digital pin 2, and the tail end servo shoudl be digital pin 11.
-Screw in wires to the screw terminals to attach to 6V and GROUND from your batteries.
-I clipped the extra metal off (you shouldn't have to do this if you are starting from a clean board, not one with female header pins soldered in)