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