802.15.4 Digital Input with a Button
by Matt Richardson
4) Wire up the Circuit

- Place the XBee adapter into the breadboard and wire up the power buses to each other.

- Connect the VCC terminal of the XBee adapter to the positive rail and the ground terminal to the negative rail.

- One side of the switch gets connected to I/O pin 0, which is physical pin 20, on the top right side of the XBee. The other side of the switch gets connected to the positive bus.

- Add a 10K resistor between the negative power bus and the side of the switch that connects to the XBee. This acts as a pull down resistor. Since digital inputs must be connected to either high or low levels, it ensures the input is connected to ground (low) when the switch is not being pushed.

- Insert the XBee into the adapter.

- And finally, connect the battery pack.

- Above is a diagram of the circuit. In the photos, we used C batteries. A pair of AA batteries, as shown in this diagram, will work fine.