Step 1: Materials
Things You Will Need: (And where to get them.)
Arduino Uno: https://www.sparkfun.com/search/results?term=arduino+uno
9 LED’s: https://www.sparkfun.com/products/9590
Flex Sensor: https://www.sparkfun.com/products/10264
1 22K Resistor: http://www.jameco.com/1/1/28314-cf1-2w223jrc-resistor-1-2-watt-5-carbon-film-22k-ohm.html
9 33o-630 Ohm Resistors: http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_690742_-1
11 Jumper Wires: https://www.sparkfun.com/products/11026
Breadboard: https://www.sparkfun.com/products/12002
Step 2: Wiring the Flex Sensor
To start, plug a jumper wire to the analog pin 0 on the Arduino. Then plug this jumper cable behind the left side of the flex sensor on the bread-board. Then, take another jumper wire and plug it into the 5v on the Arduino. This jumper will connect behind the other side of the flex sensor on the breadboard. Next, plug in the 22k resistor behind the same analog 0 jumper wire, and plug the other end 2 spaces apart. This will be where the ground wire will be. Plug another jumper cable into the ground on the Arduino and put the other end on the same rail as the other end of the resistor not connected to the flex sensor. The wiring for the flex sensor should now be done. Up next, the wiring for the LEDs!
Step 3: Wiring the LED's
On the opposite side of the breadboard, line up LED’s in a horizontal row, with the positive leg (longer leg) leading to the left. Then, plug in jumper cables from the 12, 11, 10, 9, 8, 7, 6, and 5 pins on the Arduino to the negative leg (shorter leg) on the Arduino. Following this, plug in those 330ohm resistors into the same rail as the long leg of the LEDs, while putting the other leg into the negative rail of the Arduino. The wiring for this project should be finished as of now. The end result should be that the flex sensor shuts off the LED's depending on the amount of flex used.
Step 4: Sample Code
The sample code for the project. Feel free to adjust, use it, or do whatever you want with it to fit your needs.
Link:http://www.mediafire.com/view/qqzk4aceyebhtv7/The_Mister_Fantastic_Sensor.txt
Instructables:http://www.instructables.com/id/The-The-Mister-Fantastic-LED/
No comments:
Post a Comment