/*www.theorycircuit.com*/ const int flexpin = 0; int led = 13; void setup() { Serial.begin(9600); } void loop() { int flexposition; // Input value from the analog pin. flexposition = analogRead(flexpin); // Read the position of the flex sensor (0 to 1023): analogWrite(led, flexposition); Serial.print("sensor: "); Serial.print(flexposition); delay(20); }