arduino-course/Analog Blink/Analog Blink.ino

15 lines
198 B
C++

// Analog Blink
int LED = 13;
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
int val = analogRead(A5);
digitalWrite(LED, HIGH);
delay(val);
digitalWrite(LED, LOW);
delay(val);
}