arduino-course/Analog Blink/Analog Blink.ino

15 lines
198 B
Arduino
Raw Normal View History

2019-11-15 23:52:33 +01:00
// 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);
}