Make a mouse for your computer that uses only an Arduino, an accelerometer, and your head movement to move and click.
Like this:
Like Loading...
Step #1:
Next



- The first step is to fabricate the hardware.
- First, sew the 1.5-inch elastic band to the inside of the headband as in the first picture. The elastic band should be perpendicular to the headband.
- Now, put the band on your head with the elastic strip over the top. It is imperative that you note where the elastic band intercepts the headband in the back.
- If there is more elastic band than necessary in the back, cut the extra off. Then sew two 1.5-inch "loop" velcro strips on to the end of the elastic band.
- Finally, sew three 2-inch "hook" velcro pieces onto the headband where the elastic band intersects with it (as in the third picture).
Step #2:
Next



- Make sure the finished headband looks like the first picture when it is fastened in the back. Then start the board assembly.
- First, use gorilla tape to secure the breadboard and the Arduino to the cardboard rectangle (they should fit perfectly side by side).
- Wire +5v to the first column on the breadboard (the + column) and the GND pin to the second column (- column).
- Wire the two sets of +/- columns together (as in the second picture; the long blue and orange wires at the top).
- Place the accelerometer across the gap in the breadboard as in the third picture. You will notice that there is a little arrow on the accelerometer. Place the accelerometer such that this arrow is pointed away from the long black and orange wires in the Fritzing image.
Step #3:
Next


- To finish the wiring, start with the right side of the accelerometer, the rectangle side (per the diagram).
- Wire the top pin to +5v, the middle pin to Arduino pin 2, and the bottom pin to GND.
- On the left side (the circle side), ignore the top pin, wire the middle pin to Arduino pin 3, and the bottom pin to GND.
Step #4:
Next



- Now it is time to put the two parts together.
- Tape the cardboard square with the wiring on it to the elastic strip about 1 inch away from the headband, as the second picture shows.
- The front is the part that is sewn, and the back is the part that is attached by velcro.
- Note: the headband used in this tutorial is not a sweatband, it is part of a hat (hence the velcro part that adjusts its size).
Step #5:

- The last step is to import the code into the Arduino, and run the program.
- The code can be found here.
- Please note the first comment in the comments section of the page; it has valuable information.
- Upload this code to your Arduino with the Arduino IDE (download link) using the Micro USB cable.
- Keeping the cable connected to your computer, put the band on your head and velcro the elastic band in place.
- Yay. You are all done. Congratz!