Using the same LED matrix as before, and swapping the Photo Resistor for a Flex (or Bend) sensor, and a slight modification to the code, I can now have a light show that can be controlled by "Bending".
I used my finger to bend the sensor, but I could have attached it to a plant, a tree or anything else that bends. The bending changes the resistance, and therefore the INPUT value at analog pin 0.
The parts required:
The video:
The Arduino Code:
Description: Arduino UNO: Flex Sensor and LEDs
Rating: 3.5
Reviewer: Unknown
ItemReviewed: Arduino UNO: Flex Sensor and LEDs
I used my finger to bend the sensor, but I could have attached it to a plant, a tree or anything else that bends. The bending changes the resistance, and therefore the INPUT value at analog pin 0.
The parts required:
- Arduino UNO
- 10 x Red LEDs
- 9 x 330 Ohm resistors for the LEDs
- 1 x 10K Ohm resistors for the flex sensor.
- 1 x Flex sensor
- Wires and Breadboard to connect it all together
The video:
The Sketch:
The Arduino Code:
1 | /* |
The flex sensor pins/legs are a bit fragile, so be careful when poking it into the breadboard.
For more projects - have a look at the ArduinoBasics Project Page