espsss / reference / arduino-esp32-3x-migration

arduino-esp32 2.x → 3.x migration

The breaking changes from the official 2.x → 3.0 migration guide, each as a before → after pair, checked against the core headers of 2.0.17 and 3.3.12.

ESP-IDF base and build

What the core is built on, and one build-system change.

ESP-IDF base version

2.x

2.x: ESP-IDF 4.4

3.x

3.0: ESP-IDF 5.1

The guide states the ESP-IDF version each major line is based on. Timer, I2S and SigmaDelta were refactored onto the new ESP-IDF drivers.1

ESP-IDF libraries of 3.3.12

2.x

3.x

esp32-arduino-libs idf-release_v5.5-b774170f-v3

The 3.3.12 package depends on esp32-arduino-libs built from ESP-IDF release v5.5, not 5.1.2

LEDC (PWM)

Channels are no longer passed by the sketch: functions take a pin, and the core picks the channel.

Setup and attach merged into ledcAttach

2.x

ledcSetup(channel, freq, bits);
ledcAttachPin(pin, channel);

3.x

ledcAttach(pin, freq, bits);

ledcSetup and ledcAttachPin are removed. ledcAttach sets up the pin; the LEDC channel is assigned automatically.13

channel → pin in every function

2.x

ledcWrite(channel, duty);

3.x

ledcWrite(pin, duty);

All LEDC functions now take the pin instead of the channel. The parameter is uint8_t in both versions, so an old call such as ledcWrite(0, duty) still compiles, but 0 now means GPIO0.13

ledcDetachPin renamed

2.x

ledcDetachPin(pin);

3.x

ledcDetach(pin);

Renamed; the 3.x function returns bool.13

Fade and output invert

2.x

3.x

ledcFade(pin, start_duty, target_duty, max_fade_time_ms);
ledcOutputInvert(pin, true);

New in 3.0: hardware fade (also with an interrupt callback) and inverted output on a given pin.14

Choosing the channel yourself (3.3.12)

2.x

ledcSetup(channel, freq, bits);
ledcAttachPin(pin, channel);

3.x

ledcAttachChannel(pin, freq, bits, channel);

3.3.12 also has ledcAttachChannel for a fixed channel. A different channel number does not give an independent frequency: pins attached with the same frequency and resolution usually share one timer, and ledcChangeFrequency on one of them changes all channels on that timer.45

Timer

Timers moved to the new ESP-IDF driver; the API is shorter and is set by frequency instead of timer number and divider.

timerBegin takes a frequency

2.x

hw_timer_t *t = timerBegin(0, divider, true);

3.x

hw_timer_t *t = timerBegin(frequency_hz);

One parameter: the counter frequency in Hz. The core calculates the divider and chooses the clock source; timer number and count direction are gone.16

timerAttachInterrupt without edge

2.x

timerAttachInterrupt(t, &onTimer, true);

3.x

timerAttachInterrupt(t, &onTimer);

The edge parameter is removed. timerAttachInterruptArg is new and passes an argument to the callback.16

Alarm: write + enable → timerAlarm

2.x

timerAlarmWrite(t, ticks, true);
timerAlarmEnable(t);

3.x

timerAlarm(t, ticks, true, 0);

timerAlarm sets the alarm and enables it. It has a fourth parameter, reload_count: the number of autoreloads, 0 = unlimited (ignored without autoreload).16

Removed configuration and alarm getters

2.x

timerSetDivider, timerSetCountUp, timerSetAutoReload, timerGetConfig/SetConfig, timerAlarmDisable, timerAlarmRead…, timerAttachInterruptFlag

3.x

timerBegin(frequency) + timerAlarm(); timerGetFrequency() to read back the actual frequency

The divider, direction and config functions and the alarm enable/disable/read functions are removed. timerGetFrequency returns the actual timer frequency.17

timerReadMilis spelling

2.x

timerReadMilis(t);

3.x

timerReadMillis(t);

Not in the guide, but the headers differ: the 2.0.17 name has one l, the 3.3.12 name has two.67

ADC

Three configuration functions are gone.

Removed ADC functions

2.x

analogSetClockDiv(div);
adcAttachPin(pin);
analogSetVRefPin(pin);

3.x

(removed)

analogSetClockDiv, adcAttachPin and analogSetVRefPin are removed in 3.0. In 2.0.17 analogSetVRefPin was ESP32-only.18

Hall sensor

The ESP32 Hall sensor API is removed.

hallRead removed

2.x

int v = hallRead();

3.x

(no replacement)

The Hall sensor is no longer supported. In 2.0.17 hallRead existed only for the ESP32 target.18

RMT

Functions take a pin instead of an rmt_obj_t*, the tick is set by a frequency, and rmtWrite now blocks.

rmtInit: pin handle, direction, frequency

2.x

rmt_obj_t *r = rmtInit(pin, RMT_TX_MODE, RMT_MEM_64);
rmtSetTick(r, 100);

3.x

rmtInit(pin, RMT_TX_MODE, RMT_MEM_NUM_BLOCKS_1, 10000000);

rmtInit returns bool, takes the direction as rmt_ch_dir_t and a new frequency_Hz that replaces rmtSetTick (removed). All other functions take int pin instead of rmt_obj_t*. The header's example: a 100 ns tick is 10 MHz. The memory size constants are also renamed (RMT_MEM_64 → RMT_MEM_NUM_BLOCKS_1).19

rmtWrite now blocks

2.x

rmtWrite(r, data, size);        // returns at once
rmtWriteBlocking(r, data, size);

3.x

rmtWrite(pin, data, num_symbols, timeout_ms);   // blocks
rmtWriteAsync(pin, data, num_symbols);

In 2.x rmtWrite was non-blocking. In 3.x it returns only after all data is sent or on timeout, and has a timeout_ms parameter. rmtWriteBlocking is removed; rmtWriteAsync is the non-blocking call, rmtTransmitCompleted checks it.19

rmtLoop renamed

2.x

rmtLoop(r, data, size);

3.x

rmtWriteLooping(pin, data, num_symbols);

Renamed, and takes the pin.19

Receiving: callback → buffer

2.x

rmtRead(r, callback, arg);
rmtBeginReceive(r); rmtReadData(r, buf, size); rmtEnd(r);

3.x

rmtRead(pin, data, &num_symbols, timeout_ms);
rmtReadAsync(pin, data, &num_symbols);

In 2.x rmtRead took a callback. In 3.x it reads into a buffer with a timeout, and num_rmt_symbols is a pointer. rmtBeginReceive, rmtReadData and rmtEnd are removed.19

RX threshold and carrier

2.x

rmtSetRxThreshold(r, value);
rmtSetCarrier(r, en, level, low, high);

3.x

rmtSetRxMaxThreshold(pin, idle_thres_ticks);
rmtSetCarrier(pin, en, level, frequency_Hz, duty_percent);

rmtSetRxThreshold is renamed and takes uint16_t. The carrier is now set by frequency and duty in percent instead of low/high periods. rmtSetRxMinThreshold and rmtSetEOT are new.19

I2S

A new library on the new ESP-IDF driver.

I2S library replaced by ESP_I2S

2.x

#include <I2S.h>
I2S.begin(I2S_PHILIPS_MODE, 16000, 16);

3.x

#include <ESP_I2S.h>
I2SClass i2s;
i2s.setPins(bclk, ws, dout, din);
i2s.begin(I2S_MODE_STD, 16000, I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO);

The I2S driver was redesigned. In 3.x the header is ESP_I2S.h, the sketch creates its own I2SClass object, sets pins with setPins() before begin(), and begin() takes the mode, sample rate, data bit width and slot mode.110

SigmaDelta

Same pattern as LEDC: pin instead of channel.

sigmaDeltaSetup → sigmaDeltaAttach

2.x

sigmaDeltaSetup(pin, channel, freq);
sigmaDeltaWrite(channel, duty);

3.x

sigmaDeltaAttach(pin, freq);
sigmaDeltaWrite(pin, duty);

The channel is acquired automatically. sigmaDeltaWrite takes the pin (uint8_t in both versions, so old calls still compile with the wrong meaning). sigmaDeltaRead is removed, sigmaDeltaDetachPin is renamed to sigmaDeltaDetach.111

UART (HardwareSerial)

New default pins on ESP32 and ESP32-S2, and defined rules for when pins are attached and detached.

ESP32 UART1 default pins

2.x

RX1 = GPIO9, TX1 = GPIO10

3.x

RX1 = GPIO26, TX1 = GPIO27

Changed to avoid conflicts with other peripherals.112

ESP32 UART2 default pins

2.x

RX2 = GPIO16, TX2 = GPIO17

3.x

RX2 = GPIO4, TX2 = GPIO25

Changed to avoid conflicts with other peripherals.112

ESP32-S2 UART1 default pins

2.x

RX1 = GPIO18, TX1 = GPIO17

3.x

RX1 = GPIO4, TX1 = GPIO5

Changed to avoid conflicts with other peripherals.112

setPins() and begin() pin rules

2.x

3.x

Serial1.setPins(rx, tx);   // before or after begin()
Serial1.begin(115200);     // keeps the pins set above

setPins() can be called before begin() or in any order. setPins() and begin(baud, rx, tx) detach the pins they replace; the first such call detaches the console RX0/TX0 attached at boot. A pin given as -1 is left as it is, and begin(baud) keeps pins set earlier.1

Detaching UART0 pins

2.x

3.x

Serial0.end();   // without a previous begin()

end() without a previous begin() now detaches the UART0 pins.1

setHwFlowCtrlMode / setMode types

2.x

setHwFlowCtrlMode(uint8_t mode)
setMode(uint8_t mode)

3.x

setHwFlowCtrlMode(SerialHwFlowCtrl mode, uint8_t threshold = 64)
setMode(SerialMode mode)

The guide lists the change from uint8_t to the enum types. The 2.0.17 header already declares the enum signatures, so this only affects code written for earlier 2.x releases.112

BLE

Arduino String instead of std::string, and scan results by pointer.

std::string → String

2.x

BLEDevice::init(std::string("name"));
std::string v = ...;

3.x

BLEDevice::init("name");
String v = ...;

Return and parameter types changed from std::string to Arduino String. Code that assigns results to std::string or calls std::string methods on them has to be updated.113

UUIDs as BLEUUID

2.x

uint16_t uuid

3.x

BLEUUID uuid

UUID parameters changed from uint16_t to the BLEUUID class.1

BLEScan::start / getResults return a pointer

2.x

BLEScanResults found = scan->start(5);
int n = found.getCount();

3.x

BLEScanResults *found = scan->start(5);
int n = found->getCount();

Both methods now return BLEScanResults* instead of a BLEScanResults object.114

Wi-Fi and Network

In 3.3.12 the WiFi classes are aliases of the Network library classes; flush() and available() changed meaning.

WiFiClient / WiFiServer / WiFiUDP are typedefs (3.3.12)

2.x

class WiFiClient, class WiFiServer, class WiFiUDP (WiFi library)

3.x

typedef NetworkClient WiFiClient;
typedef NetworkServer WiFiServer;
typedef NetworkUDP WiFiUDP;

The old names still work, but they are aliases of classes in the Network library.1516

flush() no longer clears the receive buffer

2.x

client.flush();   // dropped received data

3.x

client.clear();   // drop received data

flush() is meant to send out the transmit buffer and no longer clears the receive buffer; clear() does that. flush() currently does nothing in WiFiClient, WiFiClientSecure and WiFiUDP. In 3.3.12 NetworkUDP::flush() is marked deprecated with "Use clear() instead."117

WiFiServer::available() → accept()

2.x

WiFiClient c = server.available();

3.x

WiFiClient c = server.accept();

Both have the same function; available() is deprecated because in Arduino it should work differently.118

WiFiServer write() and stopAll() removed

2.x

server.print(...); server.stopAll();

3.x

(removed)

The write functions inherited from Print and stopAll() were unimplemented and are removed. WiFiServer does not manage connected clients.118

WiFiClientSecure

Not in the migration guide; these differences are from the 2.0.17 and 3.3.12 headers.

WiFiClientSecure is NetworkClientSecure (3.3.12)

2.x

#include <WiFiClientSecure.h>   // class WiFiClientSecure : public WiFiClient

3.x

#include <WiFiClientSecure.h>   // typedef NetworkClientSecure WiFiClientSecure

The header lives in the NetworkClientSecure library and only aliases NetworkClientSecure, which derives from NetworkClient.1920

setCACertBundle takes a size

2.x

client.setCACertBundle(bundle);

3.x

client.setCACertBundle(bundle, size);

The 3.3.12 signature has a second parameter for the bundle size, so the one-argument 2.x call does not compile.2021

Where the sources disagree

Sources

Each number links here; open “What it confirms” for the exact quotes. Checked 2026-11-28.

  1. arduino-esp32 3.3.12: docs/en/migration_guides/2.x_to_3.0.rst (Migration from 2.x to 3.0) primary
    What it confirms (32)
    • arduino-esp32 2.x → 3.x migration: ESP-IDF base version “versions 2.X (based on ESP-IDF 4.4) to version 3.0 (based on ESP-IDF 5.1) … Timer has been refactored to use the new ESP-IDF driver … SigmaDelta has been refactored to use the new ESP-IDF driver. … refactored to use the new ESP-IDF driver.”
    • arduino-esp32 2.x → 3.x migration: Setup and attach merged into ledcAttach “``ledcAttach`` used to set up the LEDC pin (merged ``ledcSetup`` and ``ledcAttachPin`` functions) … LEDC channels are now automatically assigned to pins”
    • arduino-esp32 2.x → 3.x migration: channel → pin in every function “In all functions, input parameter ``channel`` has been changed to ``pin``.”
    • arduino-esp32 2.x → 3.x migration: ledcDetachPin renamed “``ledcDetachPin`` renamed to ``ledcDetach``.”
    • arduino-esp32 2.x → 3.x migration: Fade and output invert “``ledcFade`` used to set up and start a fade on a given LEDC pin. … ``ledcFadeWithInterrupt`` used to set up and start a fade on a given LEDC pin with an interrupt. … ``ledcOutputInvert``”
    • arduino-esp32 2.x → 3.x migration: timerBegin takes a frequency “``timerBegin`` has now only 1 parameter (frequency). There is an automatic calculation of the divider using different clock sources … to achieve the selected frequency.”
    • arduino-esp32 2.x → 3.x migration: timerAttachInterrupt without edge “``timerAttachInterrupt`` has now only 2 parameters. The ``edge`` parameter has been removed. … ``timerAttachInterruptArg`` used to attach the interrupt to a timer using arguments.”
    • arduino-esp32 2.x → 3.x migration: Alarm: write + enable → timerAlarm “``timerAlarm`` used to set up Alarm for the timer and enable it automatically (merged ``timerAlarmWrite`` and ``timerAlarmEnable`` functions).”
    • arduino-esp32 2.x → 3.x migration: Removed configuration and alarm getters “* ``timerSetDivider`` … * ``timerSetCountUp`` … * ``timerSetAutoReload`` … * ``timerAlarmDisable`` … * ``timerAlarmReadMicros`` … * ``timerAttachInterruptFlag`` … ``timerGetFrequency`` used to get the actual frequency of the timer.”
    • arduino-esp32 2.x → 3.x migration: Removed ADC functions “* ``analogSetClockDiv`` … * ``adcAttachPin`` … * ``analogSetVRefPin``”
    • arduino-esp32 2.x → 3.x migration: hallRead removed “Hall sensor is no longer supported. … * ``hallRead``”
    • arduino-esp32 2.x → 3.x migration: rmtInit: pin handle, direction, frequency “In all functions, input parameter ``rmt_obj_t* rmt`` has been changed to ``int pin``. … ``rmtInit`` return parameter changed to bool. … ``rmtInit`` new input parameter ``uint32_t frequency_Hz`` to set frequency of RMT channel (as function ``rmtSetTick`` was removed).”
    • arduino-esp32 2.x → 3.x migration: rmtWrite now blocks “``rmtWrite`` now sending data in blocking mode. It only returns after sending all data or through a timeout. For Async mode use the new ``rmtWriteAsync`` function. … ``rmtWrite`` new input parameter ``uint32_t timeout_ms``. … * ``rmtWriteBlocking`` … * ``rmtTransmitCompleted``”
    • arduino-esp32 2.x → 3.x migration: rmtLoop renamed “``rmtLoop`` renamed to ``rmtWriteLooping``.”
    • arduino-esp32 2.x → 3.x migration: Receiving: callback → buffer “``rmtRead`` input parameters changed to ``int pin, rmt_data_t* data, size_t *num_rmt_symbols, uint32_t timeout_ms``. … ``rmtReadAsync`` input parameters changed to ``int pin, rmt_data_t* data, size_t *num_rmt_symbols``. … * ``rmtEnd`` … * ``rmtBeginReceive`` … * ``rmtReadData``”
    • arduino-esp32 2.x → 3.x migration: RX threshold and carrier “``rmtSetRxThreshold`` renamed to ``rmtSetRxMaxThreshold`` and input parameter ``uint32_t value`` has been changed to ``uint16_t idle_thres_ticks``. … ``rmtSetCarrier`` input parameters ``uint32_t low, uint32_t high`` have been changed to ``uint32_t frequency_Hz, float duty_percent``. … * ``rmtSetRxMinThreshold`` … * ``rmtSetEOT``”
    • arduino-esp32 2.x → 3.x migration: I2S library replaced by ESP_I2S “The I2S driver has been completely redesigned and refactored to use the new ESP-IDF driver.”
    • arduino-esp32 2.x → 3.x migration: sigmaDeltaSetup → sigmaDeltaAttach “``sigmaDeltaAttach`` used to set up the SigmaDelta pin (channel is acquired automatically). … ``sigmaDeltaWrite`` input parameter ``channel`` has been changed to ``pin``. … * ``sigmaDeltaRead`` … ``sigmaDeltaDetachPin`` renamed to ``sigmaDeltaDetach``.”
    • arduino-esp32 2.x → 3.x migration: ESP32 UART1 default pins “ESP32's UART1 RX and TX pins are now GPIO26 and GPIO27, respectively;”
    • arduino-esp32 2.x → 3.x migration: ESP32 UART2 default pins “ESP32's UART2 RX and TX pins are now GPIO4 and GPIO25, respectively;”
    • arduino-esp32 2.x → 3.x migration: ESP32-S2 UART1 default pins “ESP32-S2's UART1 RX and TX pins are now GPIO4 and GPIO5, respectively.”
    • arduino-esp32 2.x → 3.x migration: setPins() and begin() pin rules “It is now possible to call ``setPins()`` before ``begin()`` or in any order. … ``setPins()`` will detach any previous pins that have been changed. … ``begin(baud, rx, tx)`` will detach any previous attached pins. … ``setPins()`` or ``begin(baud, rx, tx)`` when called at first, will detach console RX0/TX0, attached in boot. … Any pin set as -1 in ``begin()`` or ``setPins()`` won't be changed nor detached. … ``begin(baud)`` will not change any pins that have been set before this call”
    • arduino-esp32 2.x → 3.x migration: Detaching UART0 pins “It is now possible to detach UART0 pins by calling ``end()`` with no previous call of ``begin()``.”
    • arduino-esp32 2.x → 3.x migration: setHwFlowCtrlMode / setMode types “``setHwFlowCtrlMode`` input parameter ``uint8_t mode`` has been changed to ``SerialHwFlowCtrl mode``. … ``setMode`` input parameter ``uint8_t mode`` has been changed to ``SerialMode mode``.”
    • arduino-esp32 2.x → 3.x migration: std::string → String “Changed APIs return and parameter type from ``std::string`` to Arduino style ``String``.”
    • arduino-esp32 2.x → 3.x migration: UUIDs as BLEUUID “Changed UUID data type from ``uint16_t`` to ``BLEUUID`` class.”
    • arduino-esp32 2.x → 3.x migration: BLEScan::start / getResults return a pointer “``BLEScan::start`` and ``BLEScan::getResults`` methods return type changed from ``BLEScanResults`` to ``BLEScanResults*``.”
    • arduino-esp32 2.x → 3.x migration: flush() no longer clears the receive buffer “``WiFiClient`` and ``WiFiUDP`` method ``flush()`` won't clear the receive buffer anymore. A new method called ``clear()`` is now used for that. … Currently ``flush()`` does nothing in ``WiFiClient``, ``WiFiClientSecure`` and ``WiFiUDP``.”
    • arduino-esp32 2.x → 3.x migration: WiFiServer::available() → accept() “``WiFiServer`` has functions ``accept()`` and ``available()`` with the same functionality. In Arduino, ``available()`` should work differently so it is now deprecated.”
    • arduino-esp32 2.x → 3.x migration: WiFiServer write() and stopAll() removed “doesn't manage connected ``WiFiClient`` objects … ``WiFiServer`` had unimplemented write functions inherited from ``Print`` class. These are now removed. … Also unimplemented method ``stopAll()`` is removed.”
    • arduino-esp32 2.x → 3.x migration: discrepancy “``ledcOutputInvert`` used to attach the interrupt to a timer using arguments. … Sets inverting of the output signal for a given LEDC pin.”
    • arduino-esp32 2.x → 3.x migration: discrepancy “``sigmaDeltaAttach`` used to set up the SigmaDelta pin (channel is acquired automatically). … bool sigmaDeltaAttach(uint8_t pin, uint32_t freq);”
  2. arduino-esp32 3.3.12: package/package_esp32_index.template.json primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: ESP-IDF libraries of 3.3.12 “"name": "esp32-arduino-libs" … "version": "idf-release_v5.5-b774170f-v3" … releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-b774170f-v3.zip”
  3. arduino-esp32 2.0.17: cores/esp32/esp32-hal-ledc.h primary
    What it confirms (3)
    • arduino-esp32 2.x → 3.x migration: Setup and attach merged into ledcAttach “uint32_t ledcSetup(uint8_t channel, uint32_t freq, uint8_t resolution_bits); … void ledcAttachPin(uint8_t pin, uint8_t channel); … bool ledcAttach(uint8_t pin, uint32_t freq, uint8_t resolution); … Channel is automatically assigned.”
    • arduino-esp32 2.x → 3.x migration: channel → pin in every function “void ledcWrite(uint8_t channel, uint32_t duty); … bool ledcWrite(uint8_t pin, uint32_t duty);”
    • arduino-esp32 2.x → 3.x migration: ledcDetachPin renamed “void ledcDetachPin(uint8_t pin); … bool ledcDetach(uint8_t pin);”
  4. arduino-esp32 3.3.12: cores/esp32/esp32-hal-ledc.h primary
    What it confirms (2)
    • arduino-esp32 2.x → 3.x migration: Fade and output invert “bool ledcFade(uint8_t pin, uint32_t start_duty, uint32_t target_duty, int max_fade_time_ms); … bool ledcOutputInvert(uint8_t pin, bool out_invert); … Sets inverting of the output signal for a given LEDC pin.”
    • arduino-esp32 2.x → 3.x migration: Choosing the channel yourself (3.3.12) “bool ledcAttachChannel(uint8_t pin, uint32_t freq, uint8_t resolution, uint8_t channel);”
  5. arduino-esp32 3.3.12: docs/en/api/ledc.rst primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: Choosing the channel yourself (3.3.12) “choosing different channel numbers does **not** by itself give … independent frequencies. If two pins are attached with the same ``freq`` and … ``resolution``, they typically share one timer. … ``ledcChangeFrequency()`` on either pin then changes **all** channels on that … timer.”
  6. arduino-esp32 2.0.17: cores/esp32/esp32-hal-timer.h primary
    What it confirms (4)
    • arduino-esp32 2.x → 3.x migration: timerBegin takes a frequency “hw_timer_t * timerBegin(uint8_t timer, uint16_t divider, bool countUp); … hw_timer_t *timerBegin(uint32_t frequency);”
    • arduino-esp32 2.x → 3.x migration: timerAttachInterrupt without edge “void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge); … void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void)); … void timerAttachInterruptArg(hw_timer_t *timer, void (*userFunc)(void *), void *arg);”
    • arduino-esp32 2.x → 3.x migration: Alarm: write + enable → timerAlarm “void timerAlarmWrite(hw_timer_t *timer, uint64_t alarm_value, bool autoreload); … void timerAlarm(hw_timer_t * timer, uint64_t alarm_value, bool autoreload, uint64_t reload_count); … ``reload_count`` number of autoreloads (0 = unlimited). Has no effect if autorealod is disabled.”
    • arduino-esp32 2.x → 3.x migration: timerReadMilis spelling “uint64_t timerReadMilis(hw_timer_t *timer);”
  7. arduino-esp32 3.3.12: cores/esp32/esp32-hal-timer.h primary
    What it confirms (2)
    • arduino-esp32 2.x → 3.x migration: Removed configuration and alarm getters “uint32_t timerGetFrequency(hw_timer_t *timer);”
    • arduino-esp32 2.x → 3.x migration: timerReadMilis spelling “uint64_t timerReadMillis(hw_timer_t *timer);”
  8. arduino-esp32 2.0.17: cores/esp32/esp32-hal-adc.h primary
    What it confirms (2)
    • arduino-esp32 2.x → 3.x migration: Removed ADC functions “void analogSetClockDiv(uint8_t clockDiv); … bool adcAttachPin(uint8_t pin); … #if CONFIG_IDF_TARGET_ESP32 … void analogSetVRefPin(uint8_t pin);”
    • arduino-esp32 2.x → 3.x migration: hallRead removed “#if CONFIG_IDF_TARGET_ESP32 … int hallRead();”
  9. arduino-esp32 2.0.17: cores/esp32/esp32-hal-rmt.h primary
    What it confirms (5)
    • arduino-esp32 2.x → 3.x migration: rmtInit: pin handle, direction, frequency “rmt_obj_t* rmtInit(int pin, bool tx_not_rx, rmt_reserve_memsize_t memsize); … float rmtSetTick(rmt_obj_t* rmt, float tick); … RMT_MEM_64 = 1, … bool rmtInit(int pin, rmt_ch_dir_t channel_direction, rmt_reserve_memsize_t memsize, uint32_t frequency_Hz); … RMT_MEM_NUM_BLOCKS_1 = 1, … Example: 100ns tick => 10MHz, thus frequency will be 10,000,000 Hz”
    • arduino-esp32 2.x → 3.x migration: rmtWrite now blocks “Non-Blocking mode - returns right after executing … bool rmtWrite(rmt_obj_t* rmt, rmt_data_t* data, size_t size); … bool rmtWrite(int pin, rmt_data_t *data, size_t num_rmt_symbols, uint32_t timeout_ms); … bool rmtWriteAsync(int pin, rmt_data_t *data, size_t num_rmt_symbols);”
    • arduino-esp32 2.x → 3.x migration: rmtLoop renamed “bool rmtLoop(rmt_obj_t* rmt, rmt_data_t* data, size_t size); … bool rmtWriteLooping(int pin, rmt_data_t *data, size_t num_rmt_symbols);”
    • arduino-esp32 2.x → 3.x migration: Receiving: callback → buffer “bool rmtRead(rmt_obj_t* rmt, rmt_rx_data_cb_t cb, void * arg); … bool rmtRead(int pin, rmt_data_t *data, size_t *num_rmt_symbols, uint32_t timeout_ms);”
    • arduino-esp32 2.x → 3.x migration: RX threshold and carrier “bool rmtSetCarrier(rmt_obj_t* rmt, bool carrier_en, bool carrier_level, uint32_t low, uint32_t high); … bool rmtSetCarrier(int pin, bool carrier_en, bool carrier_level, uint32_t frequency_Hz, float duty_percent); … bool rmtSetRxMaxThreshold(int pin, uint16_t idle_thres_ticks);”
  10. arduino-esp32 2.0.17: libraries/I2S/src/I2S.h primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: I2S library replaced by ESP_I2S “extern I2SClass I2S; … int begin(int mode, int sampleRate, int bitsPerSample); … #include <ESP_I2S.h> … I2SClass I2S; … Before calling ``begin()``, choose which pins you want to use with ``setPins()`` … I2S.begin(I2S_MODE_STD, 16000, I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO);”
  11. arduino-esp32 2.0.17: cores/esp32/esp32-hal-sigmadelta.h primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: sigmaDeltaSetup → sigmaDeltaAttach “uint32_t sigmaDeltaSetup(uint8_t pin, uint8_t channel, uint32_t freq); … void sigmaDeltaWrite(uint8_t channel, uint8_t duty); … bool sigmaDeltaAttach(uint8_t pin, uint32_t freq); … bool sigmaDeltaWrite(uint8_t pin, uint8_t duty);”
  12. arduino-esp32 2.0.17: cores/esp32/HardwareSerial.h primary
    What it confirms (5)
    • arduino-esp32 2.x → 3.x migration: ESP32 UART1 default pins “#if CONFIG_IDF_TARGET_ESP32 #define RX1 (gpio_num_t)9 … #if CONFIG_IDF_TARGET_ESP32 #define TX1 (gpio_num_t)10 … #if CONFIG_IDF_TARGET_ESP32 #define RX1 (gpio_num_t)26 … #if CONFIG_IDF_TARGET_ESP32 #define TX1 (gpio_num_t)27”
    • arduino-esp32 2.x → 3.x migration: ESP32 UART2 default pins “#if CONFIG_IDF_TARGET_ESP32 #define RX2 (gpio_num_t)16 … #if CONFIG_IDF_TARGET_ESP32 #define TX2 (gpio_num_t)17 … #if CONFIG_IDF_TARGET_ESP32 #define RX2 (gpio_num_t)4 … #if CONFIG_IDF_TARGET_ESP32 #define TX2 (gpio_num_t)25”
    • arduino-esp32 2.x → 3.x migration: ESP32-S2 UART1 default pins “#elif CONFIG_IDF_TARGET_ESP32S2 #define RX1 (gpio_num_t)18 … #elif CONFIG_IDF_TARGET_ESP32S2 #define TX1 (gpio_num_t)17 … #elif CONFIG_IDF_TARGET_ESP32S2 #define RX1 (gpio_num_t)4 … #elif CONFIG_IDF_TARGET_ESP32S2 #define TX1 (gpio_num_t)5”
    • arduino-esp32 2.x → 3.x migration: setHwFlowCtrlMode / setMode types “bool setHwFlowCtrlMode(SerialHwFlowCtrl mode = UART_HW_FLOWCTRL_CTS_RTS, uint8_t threshold = 64); … bool setMode(SerialMode mode);”
    • arduino-esp32 2.x → 3.x migration: discrepancy “bool setHwFlowCtrlMode(SerialHwFlowCtrl mode = UART_HW_FLOWCTRL_CTS_RTS, uint8_t threshold = 64); … bool setMode(SerialMode mode);”
  13. arduino-esp32 2.0.17: libraries/BLE/src/BLEDevice.h primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: std::string → String “static void init(std::string deviceName); … static bool init(String deviceName = "");”
  14. arduino-esp32 2.0.17: libraries/BLE/src/BLEScan.h primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: BLEScan::start / getResults return a pointer “BLEScanResults start(uint32_t duration, bool is_continue = false); … BLEScanResults getResults(); … BLEScanResults *start(uint32_t duration, bool is_continue = false); … BLEScanResults *getResults();”
  15. arduino-esp32 3.3.12: libraries/WiFi/src/WiFiClient.h primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: WiFiClient / WiFiServer / WiFiUDP are typedefs (3.3.12) “#include "NetworkClient.h" … typedef NetworkClient WiFiClient;”
  16. arduino-esp32 3.3.12: libraries/WiFi/src/WiFiServer.h primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: WiFiClient / WiFiServer / WiFiUDP are typedefs (3.3.12) “typedef NetworkServer WiFiServer; … typedef NetworkUDP WiFiUDP;”
  17. arduino-esp32 3.3.12: libraries/Network/src/NetworkUdp.h primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: flush() no longer clears the receive buffer “void flush(); // Print::flush tx … void clear(); // clear rx … [[deprecated("Use clear() instead.")]]”
  18. arduino-esp32 2.0.17: libraries/WiFi/src/WiFiServer.h primary
    What it confirms (2)
    • arduino-esp32 2.x → 3.x migration: WiFiServer::available() → accept() “WiFiClient accept(){return available();} … NetworkClient available() __attribute__((deprecated("Renamed to accept()."))); … NetworkClient accept();”
    • arduino-esp32 2.x → 3.x migration: WiFiServer write() and stopAll() removed “size_t write(const uint8_t *data, size_t len); … void stopAll();”
  19. arduino-esp32 3.3.12: libraries/NetworkClientSecure/src/WiFiClientSecure.h primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: WiFiClientSecure is NetworkClientSecure (3.3.12) “#include "NetworkClientSecure.h" … typedef NetworkClientSecure WiFiClientSecure;”
  20. arduino-esp32 2.0.17: libraries/WiFiClientSecure/src/WiFiClientSecure.h primary
    What it confirms (2)
    • arduino-esp32 2.x → 3.x migration: WiFiClientSecure is NetworkClientSecure (3.3.12) “class WiFiClientSecure : public WiFiClient … class NetworkClientSecure : public NetworkClient {”
    • arduino-esp32 2.x → 3.x migration: setCACertBundle takes a size “void setCACertBundle(const uint8_t * bundle);”
  21. arduino-esp32 3.3.12: libraries/NetworkClientSecure/src/NetworkClientSecure.h primary
    What it confirms (1)
    • arduino-esp32 2.x → 3.x migration: setCACertBundle takes a size “void setCACertBundle(const uint8_t *bundle, size_t size);”