21 lines
272 B
C++
21 lines
272 B
C++
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);
|
|
}
|
|
|
|
|
|
|
|
|
|
|