unable to control the on-board RBG on my ESP32-S3
Posted: Mon Jul 03, 2023 4:48 pm
Using Arduino 1.8 with AI IOT/Dual Type-C USB/WS2812B RGB/ESP32-WHO/CH343P
ESP32-S3 WIFI+BLE5.0 Development Board
ESP32-S3-WROOM-1-N16R8(16M Flash/8SRAM)
https://www.aliexpress.com/item/3283552 ... 1802f7U6y0
The following code lights up the on-board RBG LED in white:
But the Serial output states that the “RBG_BUILTIN” definition is 97! How can THAT be? Indeed … substituting “97” in place of the “onboard” references, the code still blinks the onboard RBGT LED white.
The pinout I have for my ESP32-S# show GIOP38 to the RGB LED … and this was “confirmed” by forum entry “Incorrect pin definition for the LED blink example on the ESP32-S3-DEVKITC-1”. If, instead of this simple blink code, I try code which “should” exercise the RBG LED:
The onboard RBG does NOTHING … Please help. It could be the ESP32-S3 board I’m using which actually has the RGB LED on another GPIO… I have tried several but to no avail. I have also tried the NeoPixel library and code from Adafruit… still no results
ESP32-S3 WIFI+BLE5.0 Development Board
ESP32-S3-WROOM-1-N16R8(16M Flash/8SRAM)
https://www.aliexpress.com/item/3283552 ... 1802f7U6y0
The following code lights up the on-board RBG LED in white:
Code: Select all
define onboard RGB_BUILTIN
void setup() {
Serial.begin(115200);
while (!Serial);
delay(1000);
Serial.println();
Serial.print("On Board LED: ");
Serial.print(onboard);
Serial.println();
pinMode(onboard,OUTPUT);
}
void loop() {
delay(1000);
digitalWrite(onboard,HIGH);
delay(100);
digitalWrite(onboard,LOW);
}
The pinout I have for my ESP32-S# show GIOP38 to the RGB LED … and this was “confirmed” by forum entry “Incorrect pin definition for the LED blink example on the ESP32-S3-DEVKITC-1”. If, instead of this simple blink code, I try code which “should” exercise the RBG LED:
Code: Select all
#include <FastLED.h>
#define NUM_LEDS 1
#define DATA_PIN 38
// Define the array of leds
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(115200);
while(!Serial);
Serial.println();
delay(1000);
Serial.println("Started");
FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS); // GRB ordering is typical
}
void loop() {
// Turn the LED on, then pause
leds[0] = CRGB::Red;
FastLED.show();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
FastLED.show();
delay(500);
}