void loop() { analogValue = analogRead(potPin); // read the pot value Serial.println(analogValue); // print the value of the pot back to the serial monitor digitalWrite(ledPin, HIGH); // turn the LED on delay(analogValue); // delay for a bit digitalWrite(ledPin, LOW); // turn the LED off delay(analogValue); // delay for a bit }