// No pinMode, nothing in setup(),
// just call "rgbLedWrite()".
//
// Note: Just as with the old "neopixelWrite()", the
//       "rgbLedWrite()" can be used for just one led.
//       It can not be changed when the code runs.
//       As soon as the function is called, that
//       pin seems to be fixed.
//       It might be a limitation of the function or Wokwi,
//       but whatever it is, use the function for one Neopixel.
//
// See this Issue: https://github.com/wokwi/wokwi-features/issues/861
// Instead of using RGB_BUILTIN, it is better to use 38 for the
// onboard RGB led of the ESP32-S3.
//
// Note: The old and depreciated "neopixelWrite()"
//       can be tested here: https://wokwi.com/projects/415277788888166401
//

int ledPin = 17;  // Use 17 (external) or 38 (onboard)

void setup() 
{
  // Optional color order with rgbLedWriteOrdered().
}

void loop() 
{
  // Only one Neopixel led can be used.
  rgbLedWrite(ledPin, 255,0,0);
  delay(400);
  rgbLedWrite(ledPin, 0,255,0);
  delay(400);
  rgbLedWrite(ledPin, 0,0,255);
  delay(400);
  rgbLedWrite(ledPin, 0,0,0);
  delay(400);
}
Loading
esp32-s3-devkitc-1
onboard
external