LED test runtime

This commit is contained in:
Martin Ness 2015-09-24 13:58:16 +02:00
parent 9a135f2e1c
commit 5de12c41bb

View file

@ -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));