3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Power Glove 20th Anniversary Edition

Step 10Test the Sensors and Buttons

Test the Sensors and Buttons
«
  • 3383280867_618a586324.jpg
  • IMG_3337.JPG
  • IMG_3351.JPG
Before you start soldering things to the Arduino, now is a good time to test that all the sensors and buttons are working. It's a pain but you'll thank yourself later.

Download my Arduino program (see link in intro) and make sure the pin definitions match what you're using. If you're unsure about which pins to connect anything to, take a look at the schematic (again linked in the intro).

First, prepare your board. If you have an Arduino Diecimilla or Duemilanove, these work great for prototyping. Otherwise, you can solder some test leads to the Arduino Pro Mini.

If you test using a 5V board (Diecimilla, Duemilanove, etc), connect the 3.3V pin to your breadboard's + rail. Then connect the + rail to the AREF pin on the Arduino, and change the line analogReference(DEFAULT) to analogReference(EXTERNAL) within the Arduino code.

If you test using a 3.3V board (Arduino Pro, Pro Mini, etc), connect any VCC pin to your breadboard's + rail.

Connect the GND pin on your test Arduino to the - rail on your breadboard.

Connect all the sensors in the palm to a prototyping breadboard. If you've been using the same colors as I, your main wire bundle should be:
Red: VCC
Black: GND
White: Bend Select 0
Peach: Bend Select 1
Yellow: Accel X
Green: Accel Y
Dk. Blue: Accel Z
Lt. Blue: Bend Output
Grey, Pink, Brown, Orange: Unused

Connect the Red wire to the breadboard's + rail and the Black wire to the breadboard's - rail.
Connect the Yellow, Green, and Dk. Blue wires to analog inputs 0, 1, and 2 on the Arduino.

Connect the White wire to digital pin 12, and the Peach wire to digital pin 13.

Connect the 100k ohm resistor from the bend sensor output (Lt. Blue) to ground (- rail). Connect this junction (the Lt. Blue wire) to analog input 3 on the Arduino.

On the control pad assembly, connect the common ground wire to GND on the Arduino. Connect the Up, Down, Left, Right, B, A, Start, and Select wires to digital pins 2, 3, 4, 5, 6, 7, 8, and 9, respectively.

Upload the program to the Arduino. If using the Pro Mini, you'll need to use your USB-FTDI programmer. Check that you're getting good data by opening the Serial Monitor in the Arduino software (select the USB serial port under Tools -> Serial Port, 9600 baud). Type A into the box and press send -- you should see 8 numbers separated by tabs, which will change as you move the sensors around.

If everything seems to be working, disconnect power and connect the BlueSMiRF. Connect VCC to the + rail, GND to the - rail, RX-I to Arduino digital pin 0 (TX), and TX-O to Arduino digital pin 1 (RX). Disconnect your programmer or USB and connect an external power supply. Swap the appropriate jumper if you have an older Arduino board.

If you haven't yet paired your BlueSMiRF to the computer, do that now and set up a serial port. My BlueSMiRF identified as "Sparkfun-BT" by default.

Now select the serial port you just set up in the Arduino software (Tools -> Serial Port) and open the serial monitor. Again, type A into the box and press send. Verify that you've got a good data stream.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
13
Followers
2
Author:biphenyl
I have a B.S. in Mathematics. I currently work for Flashbang Studios, an independent video game developer in Tempe. I'm an operative in Operation Mindfuck.