mirror of
https://github.com/dustinbrun/Wetterstation.git
synced 2025-12-30 08:23:21 +01:00
Teil 3
This commit is contained in:
24
ESP8266/Software_MQTT_Wetterstation_json/led.ino
Normal file
24
ESP8266/Software_MQTT_Wetterstation_json/led.ino
Normal file
@@ -0,0 +1,24 @@
|
||||
void ledon() {
|
||||
for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {
|
||||
analogWrite(dataled, fadeValue);
|
||||
delay(7);
|
||||
}
|
||||
}
|
||||
|
||||
void ledoff() {
|
||||
for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 5) {
|
||||
analogWrite(dataled, fadeValue);
|
||||
delay(7);
|
||||
}
|
||||
}
|
||||
|
||||
void ledblink() {
|
||||
ledon();
|
||||
delay(200);
|
||||
ledoff();
|
||||
delay(200);
|
||||
ledon();
|
||||
delay(200);
|
||||
ledoff();
|
||||
delay(200);
|
||||
}
|
||||
Reference in New Issue
Block a user