Instructables

Building a device that clips to your belt and tracks how much time you spend inside and outside

Featured

Step 15: Wire up the button

Picture of Wire up the button
buttonwire.JPG
Using the same types of wires we used to connect the accelerometer we will connect the button to the Arduino.  We again cut off the male ends and strip the cables to appropriate lengths.  The female ends will connect to the button through the back of the shield as shown in the picture.  We will connect three cables (as noted in the wiring example earlier) as necessary for use.  The wires I used were too short to allow one to easily leave the shell open.  Thus I extended the wires by soldering them to longer wires and wrapping the connections with electrical tape to again prevent any shorts.  At this point I can open the shell with the wires for the buttons being too short.

Reiterating the connections we have:

A common ground
A connection coming from digital 5 (reading the signal)
A connection coming from digital 3 (powering the button.  This is the power we will switch through the button)