int sensorValue = 0; // value read from the pot void setup() { pinMode(3, OUTPUT); digitalWrite(3, LOW); // initialize serial communications at 9600 bps: Serial.begin(9600); } void loop() { // read the analog in value: sensorValue = analogRead(2); if(sensorValue > 800){ digitalWrite(3, HIGH); delayMicroseconds(125); digitalWrite(3, LOW); delayMicroseconds(125); } // print the results to the Serial Monitor: Serial.print("sensor = "); Serial.print(sensorValue); }