Turn the LED on with this code:
-
void setup() {
-
pinMode(13, OUTPUT);
-
}
-
-
void loop() {
-
digitalWrite(13, HIGH); // Turn on LED
-
delay(5000);
-
digitalWrite(13, LOW); // Turn off LED
-
delay(5000);
-
}
Turn the LED on with this code:
You will need:
- DC Motor
- Power diode
- TIP 120
Turn the motor on with this code:
To get the values from the flex sensor you need a 22K resistor.
See how the sensor can be use in a project like Bad posture by Ellen Sundh.