Gabriella Levine

ongoing and past work

Lab 3 and beyond

MotorPlusLED flexSensor

Finally I rearranged the code from before and was able to get the LED to blink and the motor to spin when the flex sensor was touched. See the code on the next page

DC relayBlink from gabriella levine on Vimeo.

Here I use the Arduino and a stripped radioshack electrical outlet, this code is just set up to blink, but I’d like to use a heat sensor to … do something? (like power on the outlet).

Code for flexor sensor controlling LED and servoMotor:

#define POTPIN 0
#define LEDPIN 10
int servo = 11;

int val = 0;

void setup() {
pinMode(servo, OUTPUT);

void loop() {
val = analogRead(POTPIN);    // read the value from the sensor


Leave a Reply