Skip to content

Commit

Permalink
fix LEDs startup sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
oseiler2 committed Jul 31, 2022
1 parent 3cd232a commit 877d305
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/trafficLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ TrafficLight::TrafficLight(Model* _model, uint8_t _pinRed, uint8_t _pinYellow, u
delay(500);
ledcDetachPin(pinRed);
ledcAttachPin(pinYellow, PWM_CHANNEL_LEDS);
ledcWrite(PWM_CHANNEL_LEDS, config.brightness);
delay(500);
ledcDetachPin(pinYellow);
ledcAttachPin(pinGreen, PWM_CHANNEL_LEDS);
ledcWrite(PWM_CHANNEL_LEDS, config.brightness);
delay(500);
ledcDetachPin(pinGreen);
ledcWrite(PWM_CHANNEL_LEDS, 0);
Expand Down

0 comments on commit 877d305

Please sign in to comment.