LED test runtime
This commit is contained in:
parent
9a135f2e1c
commit
5de12c41bb
1 changed files with 11 additions and 0 deletions
|
@ -56,9 +56,20 @@ void setup() {
|
|||
pinMode(LED_Y, OUTPUT);
|
||||
pinMode(LED_R, OUTPUT);
|
||||
Serial.begin(9600);
|
||||
testLeds();
|
||||
setStateOnLeds();
|
||||
}
|
||||
|
||||
// Schaltet alle LEDs nacheinander an
|
||||
void testLeds() {
|
||||
digitalWrite(LED_R, HIGH);
|
||||
delay(1000);
|
||||
digitalWrite(LED_Y, HIGH);
|
||||
delay(1000);
|
||||
digitalWrite(LED_G, HIGH);
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
// bildet den aktuellen Zustand auf die LEDs ab
|
||||
void setStateOnLeds() {
|
||||
digitalWrite(LED_R, (state == STATE_OFF));
|
||||
|
|
Reference in a new issue