Guides · 9 min read

ledcSetup Was Not Declared in This Scope: ESP32 Core 3.x Fix

Fix 'ledcSetup was not declared in this scope' after updating to ESP32 core 3.x, plus timerBegin, ESP-NOW and BLE errors, with an old-to-new API table.

'ledcSetup' was not declared in this scope is the most common error you'll hit when you compile an older sketch after updating the ESP32 Arduino core to version 3.x. Your code isn't broken: it was written for 2.x, and in 3.x some functions were removed on purpose or replaced with new parameters. The PWM functions ledcSetup and ledcAttachPin were replaced by ledcAttach, hardware timers are now started directly with a frequency, the ESP-NOW callback signatures changed, and the BLE library switched from std::string to the Arduino String.

In this guide you'll first find out which core you're running, then we fix the most common errors one by one using a table that shows the old and new functions side by side: LEDC, timerBegin and timerAlarm, ESP-NOW, BLE, the task watchdog and errors that come from libraries. Finally we show how to downgrade the core to 2.0.17 and how to make the same code run on both versions with the ESP_ARDUINO_VERSION macros; every example in this guide is written to compile on both 2.x and 3.x.

ESP32 DevKit development board
The board is the same; what changed is the version of the esp32 package in the Arduino IDE. After moving to 3.x, PWM, timer and ESP-NOW code written for 2.x may no longer compile.

Why did this happen? What changed in ESP32 Arduino core 3.x

Espressif built version 3.0 of the Arduino core on top of ESP-IDF 5.1 in 2024. ESP-IDF is the official software framework for the ESP32, and many drivers were rewritten in the 5.x series; the Arduino layer used the opportunity to simplify its API. For example, where you used to open an LEDC channel and then attach a pin to it, you now pass the pin, frequency and resolution in one line and the channel is picked automatically. The catch is that everyone who clicked "Update" in the Arduino IDE Boards Manager got this break without warning: a project that compiled yesterday is full of red errors today. And since newer chips such as the ESP32-C6 and ESP32-H2 are only supported by 3.x, going back isn't always an option.

Core versionBased on ESP-IDFWhat it means for you
2.0.174.4Last 2.x release; all code written for the old API compiles
3.0.x5.1LEDC, timers, the ESP-NOW receive callback and BLE changed
3.1.x – 3.2.x5.3 – 5.4Keeps the new 3.0 API; code ported to 3.0 usually compiles unchanged
3.3.x5.5The ESP-NOW send callback signature changed too

Find out which core version you're using

The quickest way is to look at the esp32 by Espressif Systems entry in Tools > Board > Boards Manager; the installed version is shown there. If you want to check from your code, print the ESP_ARDUINO_VERSION_MAJOR, _MINOR and _PATCH macros defined by the core. They come in automatically with Arduino.h, so there's nothing to include. The sketch below prints both the core version and the ESP-IDF version to the Serial Monitor and tells you which API to use.

C++ (Arduino IDE)
1// Çekirdek sürümünü yazdır / print the core version
2void setup() {
3  Serial.begin(115200);
4  delay(1000);
5  Serial.printf("Arduino-ESP32 core: %d.%d.%d\n",
6                ESP_ARDUINO_VERSION_MAJOR, ESP_ARDUINO_VERSION_MINOR, ESP_ARDUINO_VERSION_PATCH);
7  Serial.printf("ESP-IDF: %s\n", ESP.getSdkVersion());
8#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
9  Serial.println("Yeni API: ledcAttach, timerBegin(freq) / new API");
10#else
11  Serial.println("Eski API: ledcSetup, timerBegin(n, div, up) / old API");
12#endif
13}
14
15void loop() {
16}

Old vs new functions: a migration table

Core 2.xCore 3.xNote
ledcSetup(channel, freq, resolution) + ledcAttachPin(pin, channel)ledcAttach(pin, freq, resolution)The channel is picked automatically
Using a specific channelledcAttachChannel(pin, freq, resolution, channel)For pins that share one channel
ledcWrite(channel, duty)ledcWrite(pin, duty)The first parameter is now the pin
ledcWriteTone(channel, freq)ledcWriteTone(pin, freq)Common in buzzer sketches
ledcDetachPin(pin)ledcDetach(pin)Renamed
ledcChangeFrequency(channel, freq, resolution)ledcChangeFrequency(pin, freq, resolution)The first parameter is now the pin
timerBegin(0, 80, true)timerBegin(1000000)The parameter is the tick frequency in Hz
timerAttachInterrupt(t, function, true)timerAttachInterrupt(t, function)The edge parameter is gone
timerAlarmWrite(t, 1000000, true) + timerAlarmEnable(t)timerAlarm(t, 1000000, true, 0)Last parameter is the reload count; 0 means unlimited
timerAlarmDisable(t)timerStop(t)Stops the timer
void f(const uint8_t *mac, const uint8_t *data, int len)void f(const esp_now_recv_info_t *info, const uint8_t *data, int len)ESP-NOW receive; MAC: info->src_addr
std::string v = c->getValue();String v = c->getValue();BLE characteristic value
BLEScanResults r = scan->start(5);BLEScanResults *r = scan->start(5);A BLE scan now returns a pointer
esp_task_wdt_init(5, true)esp_task_wdt_reconfigure(&config)The task watchdog is configured with a struct
hallRead()RemovedThe built-in Hall sensor is gone

How to fix 'ledcSetup was not declared in this scope'

The compiler usually reports two errors for the same lines: 'ledcSetup' was not declared in this scope and 'ledcAttachPin' was not declared in this scope, sometimes followed by "did you mean 'ledcAttach'?". The reason is that in 3.x the LEDC peripheral is managed per pin instead of per channel. ledcAttach(pin, freq, resolution) finds an unused channel, sets the frequency and resolution and attaches the pin; it returns false if it fails. After that you pass the pin number to ledcWrite, not the channel number. The LED fade sketch below keeps that difference in one place with two small helper functions, so the rest of the program doesn't care which core it runs on.

C++ (Arduino IDE)
1// İki sürümde de derlenen LED soldurma / LED fade that builds on both core versions
2const int LED_PIN = 2;          // çoğu DevKit'te dahili LED / onboard LED on most DevKits
3const int PWM_FREQ = 5000;      // Hz
4const int PWM_RES = 8;          // 8 bit: 0-255
5
6#if ESP_ARDUINO_VERSION_MAJOR < 3
7const int LED_CH = 0;           // yalnız 2.x: LEDC kanalı / 2.x only: LEDC channel
8#endif
9
10void pwmBegin() {
11#if ESP_ARDUINO_VERSION_MAJOR >= 3
12  ledcAttach(LED_PIN, PWM_FREQ, PWM_RES);   // 3.x: pin, frekans, çözünürlük / pin, frequency, resolution
13#else
14  ledcSetup(LED_CH, PWM_FREQ, PWM_RES);     // 2.x: önce kanalı kur / set up the channel first
15  ledcAttachPin(LED_PIN, LED_CH);           // sonra pini kanala bağla / then attach the pin to it
16#endif
17}
18
19void pwmWrite(uint32_t duty) {
20#if ESP_ARDUINO_VERSION_MAJOR >= 3
21  ledcWrite(LED_PIN, duty);                 // 3.x: ilk parametre pin / first parameter is the pin
22#else
23  ledcWrite(LED_CH, duty);                  // 2.x: ilk parametre kanal / first parameter is the channel
24#endif
25}
26
27void setup() {
28  pwmBegin();
29}
30
31void loop() {
32  for (int d = 0; d <= 255; d++) { pwmWrite(d); delay(4); }
33  for (int d = 255; d >= 0; d--) { pwmWrite(d); delay(4); }
34}
Here's the sneakiest trap: a line such as ledcWrite(0, 128) compiles without errors on both versions. On 2.x, 0 is a channel number; on 3.x it means GPIO 0, so your LED stays dark and the compiler gives no warning at all. When you port code, don't stop at the compile errors; check every ledcWrite, ledcWriteTone and ledcRead call in the project.
If all you need is to set an LED's brightness or a motor's speed, use analogWrite(pin, value). On the ESP32 it exists in both the 2.x and 3.x cores, it sets up the channel by itself and keeps your code compatible with an Arduino Uno. Use analogWriteFrequency() to change the frequency and analogWriteResolution() for the resolution. For the basics of PWM, see What is PWM.

Timer errors: timerBegin, timerAlarmWrite, timerAlarmEnable

Older sketches that use timers fail with too many arguments to function 'hw_timer_t* timerBegin(uint32_t)' and 'timerAlarmWrite' was not declared in this scope. In 2.x, timerBegin took three parameters: the timer number (0–3), a prescaler and the count direction. Dividing the 80 MHz clock by 80 made the timer count a million times per second, once every microsecond. In 3.x you only pass the tick frequency you want and the driver picks an unused timer itself. timerBegin(1000000) still gives 1 µs ticks, so an alarm value of 500000 means 500 ms. timerAlarmWrite and timerAlarmEnable merged into a single timerAlarm(timer, value, autoreload, reload_count) call; with a reload count of 0 the alarm repeats until you stop it.

C++ (Arduino IDE)
1// Donanım zamanlayıcısıyla 500 ms kesme / 500 ms hardware timer interrupt
2const int LED_PIN = 2;
3hw_timer_t *blinkTimer = nullptr;
4volatile uint32_t tickCount = 0;
5
6void IRAM_ATTR onTimer() {
7  tickCount++;                                   // kesmede kısa iş / keep the ISR short
8}
9
10void setup() {
11  Serial.begin(115200);
12  pinMode(LED_PIN, OUTPUT);
13#if ESP_ARDUINO_VERSION_MAJOR >= 3
14  blinkTimer = timerBegin(1000000);              // 1 MHz: 1 tık = 1 µs / 1 tick = 1 µs
15  timerAttachInterrupt(blinkTimer, &onTimer);    // kenar parametresi yok / no edge parameter
16  timerAlarm(blinkTimer, 500000, true, 0);       // 500 ms, otomatik tekrar, sınırsız / auto reload, unlimited
17#else
18  blinkTimer = timerBegin(0, 80, true);          // zamanlayıcı 0, 80 MHz / 80 = 1 MHz / timer 0
19  timerAttachInterrupt(blinkTimer, &onTimer, true);
20  timerAlarmWrite(blinkTimer, 500000, true);     // 500 ms, otomatik tekrar / auto reload
21  timerAlarmEnable(blinkTimer);
22#endif
23}
24
25void loop() {
26  static uint32_t last = 0;
27  uint32_t now = tickCount;
28  if (now != last) {
29    last = now;
30    digitalWrite(LED_PIN, now % 2);              // her 500 ms'de LED'i çevir / toggle every 500 ms
31    Serial.println(now);
32  }
33}

ESP-NOW callback signature error

ESP-NOW receiver code stops on 3.x with invalid conversion from 'void (*)(const uint8_t*, const uint8_t*, int)' to 'esp_now_recv_cb_t'. ESP-IDF 5 no longer passes the sender's MAC address to the receive function; it passes a struct called esp_now_recv_info_t that holds the sender address (src_addr), the destination address (des_addr) and receive details including signal strength (rx_ctrl). With ESP-IDF 5.5, which ships with core 3.3, the send callback changed as well: its first parameter is now a wifi_tx_info_t pointer that carries the destination address. The sketch below handles both differences at compile time and works the same on 2.x, 3.0–3.2 and 3.3. To learn ESP-NOW itself, take a look at the ESP-NOW guide.

C++ (Arduino IDE)
1#include <WiFi.h>
2#include <esp_now.h>
3#include <esp_idf_version.h>
4
5uint8_t peerMac[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};   // yayın adresi / broadcast address
6
7// Alma: 3.x'te ilk parametre bilgi yapısıdır / receive: in 3.x the first parameter is an info struct
8#if ESP_ARDUINO_VERSION_MAJOR >= 3
9void onReceive(const esp_now_recv_info_t *info, const uint8_t *data, int len) {
10  const uint8_t *mac = info->src_addr;          // gönderenin MAC'i / sender MAC
11#else
12void onReceive(const uint8_t *mac, const uint8_t *data, int len) {
13#endif
14  Serial.printf("%02X:%02X:%02X:%02X:%02X:%02X -> %d bayt / bytes\n",
15                mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], len);
16}
17
18// Gönderme: ESP-IDF 5.5 (core 3.3) ile imza değişti / send: signature changed with ESP-IDF 5.5 (core 3.3)
19#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
20void onSent(const wifi_tx_info_t *info, esp_now_send_status_t status) {
21#else
22void onSent(const uint8_t *mac, esp_now_send_status_t status) {
23#endif
24  Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Gitti / sent" : "Gitmedi / failed");
25}
26
27void setup() {
28  Serial.begin(115200);
29  WiFi.mode(WIFI_STA);
30  if (esp_now_init() != ESP_OK) {
31    Serial.println("ESP-NOW baslatilamadi / init failed");
32    return;
33  }
34  esp_now_register_recv_cb(onReceive);
35  esp_now_register_send_cb(onSent);
36
37  esp_now_peer_info_t peer = {};
38  memcpy(peer.peer_addr, peerMac, 6);
39  peer.channel = 0;                             // geçerli kanal / current channel
40  peer.encrypt = false;
41  esp_now_add_peer(&peer);
42}
43
44void loop() {
45  const char msg[] = "BlueGrays";
46  esp_now_send(peerMac, (const uint8_t *)msg, sizeof(msg));
47  delay(2000);
48}

BLE changes: String instead of std::string

The most common error in BLE code is conversion from 'String' to non-scalar type 'std::string' requested. In 3.x the BLE library switched to Arduino's String class for functions that return text, so getValue() now returns a String rather than a std::string. The most practical way to read the value on both versions is to add .c_str() and assign it to a String. On the scanning side, BLEScan::start() now returns a pointer instead of an object, so you access the result with an arrow (->) instead of a dot. For the full story on talking to a phone over BLE, see ESP32 Bluetooth and BLE.

C++ (Arduino IDE)
1// İki sürümde de derlenir / compiles on both versions
2String value = pCharacteristic->getValue().c_str();   // 2.x std::string, 3.x String döndürür / returns std::string on 2.x, String on 3.x
3
4#if ESP_ARDUINO_VERSION_MAJOR >= 3
5BLEScanResults *found = pBLEScan->start(5, false);    // 3.x: işaretçi döner / returns a pointer
6int count = found->getCount();
7#else
8BLEScanResults found = pBLEScan->start(5, false);     // 2.x: nesne döner / returns an object
9int count = found.getCount();
10#endif

Task watchdog error

Older code that uses the watchdog fails with invalid conversion from 'int' to 'const esp_task_wdt_config_t*' or "too many arguments to function esp_task_wdt_init". In ESP-IDF 5 the timeout and panic setting moved into a single struct. And because the Arduino core already starts the watchdog at boot, you need to call esp_task_wdt_reconfigure() instead of initialising it again. We explain what the watchdog is for in detail in Arduino watchdog timer.

C++ (Arduino IDE)
1#include <esp_task_wdt.h>
2
3// setup() içinde / inside setup()
4#if ESP_ARDUINO_VERSION_MAJOR >= 3
5esp_task_wdt_config_t cfg = {};
6cfg.timeout_ms = 5000;                 // 5 saniye / 5 seconds
7cfg.idle_core_mask = 0;                // boşta görevleri izleme / don't watch idle tasks
8cfg.trigger_panic = true;              // süre dolunca yeniden başlat / reset on timeout
9esp_task_wdt_reconfigure(&cfg);        // çekirdek bekçiyi zaten başlatmıştır / the core already started it
10#else
11esp_task_wdt_init(5, true);            // 2.x: saniye, panik / 2.x: seconds, panic
12#endif
13esp_task_wdt_add(NULL);                // loop görevini izle / watch the loop task

Other common core 3.x errors

Error or symptomCauseFix
'hallRead' was not declared in this scopeThe built-in Hall sensor was removed in ESP-IDF 5Use an external Hall sensor such as the A3144 or 49E
available() is deprecated warningWiFiServer::available() was replaced by accept()Write server.accept(); the warning doesn't stop the build
Error path points into the libraries folder (e.g. ESP32PWM.cpp)An old version of the library is installedInstall the current version from the Library Manager
Sketch too big / text section exceeds available spaceThe same code usually builds larger on 3.xPick Tools > Partition Scheme > Huge APP or Minimal SPIFFS
MAC address shows 00:00:00:00:00:00The address is read before the Wi-Fi interface startsCall WiFi.mode(WIFI_STA) first, wait a moment, then read it
Deprecation warning for esp_adc_cal.hThe legacy ADC calibration driverRead the voltage directly with analogReadMilliVolts()
LED or IR code using RMT won't compile or crashesThe RMT driver was rewritten in ESP-IDF 5Install current versions of libraries such as FastLED or IRremoteESP8266

Library errors: when the problem isn't in your code

Look at the file path at the start of the error message. If it points not to your .ino file but to a file under Documents/Arduino/libraries, the problem is in the library; older versions of ESP32Servo, for example, call ledcSetup internally and won't compile on 3.x. In that case there's nothing to change in your own code; you need to update the library. Most popular libraries have gained 3.x support since 2024.

  • Read the error path: if you see ".../libraries/LibraryName/src/...", update the library; if you see ".../sketch.ino", go back to the table in this guide.
  • Install the latest version: search for the library in the Library Manager and pick the newest release from the version list; the 3.x releases of ESP32Servo work with core 3.
  • Check the release notes: the changelog on the library's GitHub page says which version added "Arduino core 3" or "ESP-IDF 5" support.
  • Abandoned libraries: for a library that hasn't been updated in a long time, look for a maintained fork or switch to a current library that does the same job.
  • Temporary fix: if a deadline is close, downgrade the core to 2.0.17, finish the project and do the migration later with a clear head.

Downgrading the core to 2.0.17

  1. In the Arduino IDE open Tools > Board > Boards Manager and search for esp32.
  2. Pick 2.0.17 from the version list on the esp32 by Espressif Systems entry.
  3. Click Install; the IDE removes the installed 3.x version and installs 2.0.17. It can take a few minutes depending on your connection.
  4. If the IDE shows an "updates available" notification at startup, be careful not to update the esp32 package, or you'll be back on 3.x.
  5. If you use PlatformIO, check the platform line in platformio.ini: the official espressif32 platform shipped the 2.0.x core for a long time, and for 3.x most people use the community-maintained pioarduino platform.
Downgrading is a quick fix, but it shouldn't be permanent. New library versions and bug fixes are released for 3.x, and if you use an ESP32-C6 or ESP32-H2 you can't go back to 2.x at all. If you run into trouble installing the board package, ESP32 board package won't install has step-by-step fixes.

Running the same code on both versions: ESP_ARDUINO_VERSION

The core defines three macros: ESP_ARDUINO_VERSION_MAJOR, ESP_ARDUINO_VERSION_MINOR and ESP_ARDUINO_VERSION_PATCH. The combined ESP_ARDUINO_VERSION value, compared with ESP_ARDUINO_VERSION_VAL(3, 0, 0), answers "is this 3.0 or newer?" in one line. When a change comes straight from ESP-IDF, as with the ESP-NOW send callback, it's more accurate to use the ESP_IDF_VERSION and ESP_IDF_VERSION_VAL macros. A good habit is to keep the #if blocks inside small helper functions such as pwmBegin() and pwmWrite() instead of scattering them through the code; when you eventually drop 2.x support, you only delete a few lines. We used the same approach in the ESP32 Wi-Fi car sketch.

Migration checklist

  • Note the esp32 version installed in the Boards Manager; your teammates and the computers at school should use the same version.
  • Search the code for lines containing ledcSetup, ledcAttachPin, ledcWrite, timerBegin, timerAlarm, esp_now_register and getValue.
  • For every ledcWrite call, check whether the first parameter is a channel or a pin.
  • Update every library you use, then try compiling again.
  • Once it compiles, always run the code on the board; LEDC and timer mistakes don't always show up as compile errors.
  • If you share the project, write the core version it was tested with in the README or at the top of the sketch.

Moving to ESP32 core 3.x looks scary at first, but most errors come from the handful of functions in this guide's table and are fixed with a few lines of changes. If you want to get better at reading compile errors in general, Arduino compilation errors is a good place to start. In the BlueGrays app you'll find ESP32 projects such as LED fading with PWM, RGB LEDs, servo and NeoPixel control, with wiring diagrams and code, and you can try them on your own board to see which core version they run with.

Frequently asked questions

What does 'ledcSetup' was not declared in this scope mean?

Your code uses the PWM functions from version 2.x of the ESP32 Arduino core, but 3.x is installed on your computer. In 3.x ledcSetup and ledcAttachPin were removed and replaced by a one-line ledcAttach(pin, freq, resolution), and ledcWrite now takes a pin instead of a channel.

How do I check which ESP32 core version I have?

Open the Boards Manager in the Arduino IDE and look at the esp32 by Espressif Systems entry. From code, you can print the ESP_ARDUINO_VERSION_MAJOR, ESP_ARDUINO_VERSION_MINOR and ESP_ARDUINO_VERSION_PATCH macros to the Serial Monitor.

How do I downgrade the ESP32 core to 2.0.17?

Search for esp32 in the Boards Manager, choose 2.0.17 from the version list on the esp32 by Espressif Systems entry and click Install. The IDE removes the current version and installs the older one; afterwards, don't accept the esp32 package in update notifications.

Why does timerBegin give a "too many arguments" error?

In 3.x timerBegin only takes the tick frequency: timerBegin(1000000) starts a timer that counts every microsecond. Replace the old timerBegin(0, 80, true) call with it, and use timerAlarm(timer, value, true, 0) instead of timerAlarmWrite and timerAlarmEnable.

Can my code run on both ESP32 core 2.x and 3.x?

Yes. If you wrap the lines that differ in #if ESP_ARDUINO_VERSION_MAJOR >= 3, the compiler picks the right version for the installed core. Keeping these blocks in small helper functions keeps the code readable and makes it easy to drop old-version support later.

Does analogWrite work on the ESP32?

Yes, analogWrite exists in both the 2.x and 3.x cores and sets up the LEDC channel by itself. It's the easiest version-independent way to set LED brightness or motor speed; change the frequency with analogWriteFrequency() and the resolution with analogWriteResolution().

See all projects
LED Blink with ESP32
ES-1Beginner

LED Blink with ESP32

Teaches basic GPIO output usage with ESP32. We achieve a blinking effect by turning an LED on and off from a digital pin. ESP32 version of the classic blink project on Arduino UNO; the basic blink commands in the Arduino environment are the same, but the ESP32's pin layout and 3.3 V GPIO levels differ from those of the Arduino UNO.

4.7(38)
114
ESP32 Built-in LED Blink
ES-4Beginner

ESP32 Built-in LED Blink

Blinking the built-in blue LED on the ESP32 DevKit V1. No external components required! The first project you should try when you buy an ESP32. GPIO 2 is connected to the built-in LED.

4.8(29)
55
ESP32 LED Fade with PWM
ES-8Beginner

ESP32 LED Fade with PWM

Smoothly changing the brightness of the LED from 0 to max, from max to 0. We control PWM with analogWrite() as in Arduino - the same syntax as ESP32 Arduino Core 3.0+ works without problems. Pin definition + pinMode + analogWrite is enough.

4.8(36)
55
ESP32 RGB LED Control
ES-9Beginner

ESP32 RGB LED Control

Unlimited color generation with a single RGB LED instead of 3 separate LEDs. As in Arduino, we make a rainbow transition by setting the R/G/B values with analogWrite(). Color theory (such as red+green=yellow) is seen practically.

4.6(29)
52
ESP32 LED Brightness Control with a Potentiometer (Analog → PWM)
ES-13Intermediate
Premium

ESP32 LED Brightness Control with a Potentiometer (Analog → PWM)

In this project, we control the brightness of an LED analogically using a potentiometer. The ESP32's ADC pin reads the 0-3.3V voltage from the potentiometer, and this value is then converted into a PWM (Pulse Width Modulation) signal and sent to the LED. As a result, as you turn the potentiometer, the LED gradually brightens and dims. With Arduino Core 3.0+, analogWrite() can be used directly; on the ESP32-S2/S3, the ADC resolution is fixed at 12-bit.

4.4(20)
32
ESP32 Servo Motor (Potentiometer Control)
ES-16Intermediate
Premium

ESP32 Servo Motor (Potentiometer Control)

In this project, we control an SG90 servo motor using a potentiometer. We adjust the servo angle by mapping the analog value read from the potentiometer to the 0–180-degree range. The ESP32Servo library generates servo signals on suitable output-capable GPIO pins of the ESP32; this project uses GPIO 18. This is a fundamental control method for robotic arms, camera gimbals, and automatic door mechanisms.

4.3(30)
42
ESP32 WS2812B NeoPixel Strip Control
ES-24Intermediate
Premium

ESP32 WS2812B NeoPixel Strip Control

WS2812B (NeoPixel) addressable LEDs are smart RGB LEDs that can be chained and controlled from a single data pin. In this project we drive an 8-LED WS2812B strip with the Adafruit_NeoPixel library and create a smooth rainbow animation. The ESP32's 3.3V logic works with most WS2812B batches; if it gets unstable, we show the fix with a 470Ω series resistor and a 1000µF capacitor. The animation shifts the hue in HSV color space.

4.9(19)
31
ESP32 Color Mixer Light (3 Potentiometers + RGB LED + OLED)
ES-36Advanced
Premium

ESP32 Color Mixer Light (3 Potentiometers + RGB LED + OLED)

A smart color-mixer lamp: turn 3 potentiometers on the ESP32 and mix any color you like! As you turn the red, green and blue potentiometers, the common-cathode RGB LED changes color instantly. The SSD1306 OLED display shows each channel's 0-255 value, fill bars and the HEX web color code (like #FF8040) live.

4.7(6)
10