21 lines
272 B
Arduino
21 lines
272 B
Arduino
|
int sensorPin = A0;
|
||
|
int ledPin = LED_BUILTIN;
|
||
|
int sensorWert = 0;
|
||
|
|
||
|
void setup() {
|
||
|
pinMode(ledPin, OUTPUT);
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
sensorWert = analogRead(sensorPin);
|
||
|
digitalWrite(ledPin, HIGH);
|
||
|
delay(sensorWert);
|
||
|
digitalWrite(ledPin, LOW);
|
||
|
delay(sensorWert);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|