I am trying to use my ESP32-S3-DevKitC-1 microcontroller to power RGB addressable LEDs via the ESP-IDF 5.5 Command Prompt, but I am not able to power on the LEDs. I have tested the microcontroller with the sample Hello World project and it worked fine. The microcontroller is connected to my laptop via a USB A to USB micro B cable.
The information about the microcontroller is hyperlinked above, but for reference, I am currently connecting the ESP-32 5V power supply (orange wire) from 24J to the right + rail, the ESP-32 Ground (green wire) from 44A to the right - rail, and the ESP-32 GPIO4 (yellow wire) from 41J to 55A. I have connected 1 330 ohm resistor from 55E to 55F. The LED's 5V (red wire) is connected to the right + rail, the LED's Ground (black wire) is connected to the right - rail, and the LED's Din is connected to 55J.
I am new to circuits, so any help would be appreciated.
Edit: This has the pins on the dev board and the datasheet: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-devkitc-1/user_guide_v1.1.html. The LED strip is a 5V WS2812B Addressable RGB LED Strip. I have used it once before with a different microcontroller and it has successfully lit up, but I tested that this ESP32-S3 works. By "power on" I'm just trying to get my code to light up the LED. "Din" is "Data in". The datasheet for the LEDs is here: https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf. I pushed the board between 23 B-I and 44B-I. The ESP32-S3 pins diagram is below.
My code is attached below for reference. There are no errors when building and running it through the ESP-IDF 5.5 Command Prompt.
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "led_strip.h"
#include "led_strip_rmt.h"
#define LED_GPIO 4 // DIN pin on your strip
#define LED_COUNT 30 // <-- set this to how many pixels you connected
static const char *TAG = "ws2812_demo";
void app_main(void)
{
// ---- LED strip config ----
led_strip_config_t strip_config = {
.strip_gpio_num = LED_GPIO,
.max_leds = LED_COUNT,
// Most WS2812 use GRB byte order:
.led_pixel_format = LED_PIXEL_FORMAT_GRB, // if your headers support it
.led_model = LED_MODEL_WS2812, // ditto
.flags.invert_out = false,
};
// ---- RMT backend config ----
led_strip_rmt_config_t rmt_config = {
.clk_src = RMT_CLK_SRC_DEFAULT,
.resolution_hz = 10 * 1000 * 1000, // 10 MHz is fine
.mem_block_symbols = 64,
.flags.with_dma = false,
};
led_strip_handle_t strip = NULL;
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &strip));
ESP_LOGI(TAG, "LED strip created");
// Clear start
ESP_ERROR_CHECK(led_strip_clear(strip));
vTaskDelay(pdMS_TO_TICKS(50));
while (1) {
// Fill RED
for (int i = 0; i < LED_COUNT; i++) led_strip_set_pixel(strip, i, 255, 0, 0);
led_strip_refresh(strip);
vTaskDelay(pdMS_TO_TICKS(500));
// Fill GREEN
for (int i = 0; i < LED_COUNT; i++) led_strip_set_pixel(strip, i, 0, 255, 0);
led_strip_refresh(strip);
vTaskDelay(pdMS_TO_TICKS(500));
// Fill BLUE
for (int i = 0; i < LED_COUNT; i++) led_strip_set_pixel(strip, i, 0, 0, 255);
led_strip_refresh(strip);
vTaskDelay(pdMS_TO_TICKS(500));
// Chase ORANGE down the strip (simple “ripple”)
for (int k = 0; k < LED_COUNT; k++) {
for (int i = 0; i < LED_COUNT; i++) led_strip_set_pixel(strip, i, 0, 0, 0);
led_strip_set_pixel(strip, k, 255, 80, 0);
led_strip_refresh(strip);
vTaskDelay(pdMS_TO_TICKS(30));
}
// Off
led_strip_clear(strip);
vTaskDelay(pdMS_TO_TICKS(300));
}
}

