Skip to content

Implement simple RGB driver via digitalWrite; solving #6783 #6808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 24, 2022
Prev Previous commit
Next Next commit
Updated example - lowered single channel brightness to LED_BRIGHTNESS
  • Loading branch information
PilnyTomas committed May 27, 2022
commit 8786e83e23c1df196d5cb6f57f646d0b8787772c
8 changes: 4 additions & 4 deletions libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ void loop() {
digitalWrite(LED_BUILTIN, LOW); // Turn the RGB LED off
delay(1000);

RGBLedWrite(LED_BUILTIN,255,0,0); // Red
RGBLedWrite(LED_BUILTIN,LED_BRIGHTNESS,0,0); // Red
delay(1000);
RGBLedWrite(LED_BUILTIN,0,255,0); // Green
RGBLedWrite(LED_BUILTIN,0,LED_BRIGHTNESS,0); // Green
delay(1000);
RGBLedWrite(LED_BUILTIN,0,0,255); // Blue
RGBLedWrite(LED_BUILTIN,0,0,LED_BRIGHTNESS); // Blue
delay(1000);
RGBLedWrite(LED_BUILTIN,0,0,0); // Off / black
delay(1000);
delay(1000);
#endif
}