Skip to main content

I2C Nodes

the i2c library allows users to create i2c master.

Config Nodes

i2c config

Handles settings for communication using I2C.

Inputs

  • I2C Port : Selects which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • SDA Pin : Specify the SDA pin for communication
  • SCL Pin : Specify the SCL pin for communication
  • I2C Freq(Hz) : Specify the clock speed(frequency) for I2C communication
  • SDA Pullup Enable : Activate the pull-up resistor on the SDA (data) line
  • SCL Pullup Enable : Activate the pull-up resistor on the SCL (clock) line

i2c commands config

Handles settings for communication commands using I2C.

Inputs

  • Command name : Define a unique, recognizable name for this command sequence — enabling you to reuse or chain commands seamlessly within your flow.

Proc Nodes

i2c driver install

<b>Handle data exchange with I2C devices by sending or receiving information over the I2C bus. This node manages communication after you’ve set up the driver.</b><br>1️ Read Data from a Sensor (Read Mode)<br>Connect to a temperature sensor like BME280.<br>Set the address and define how many bytes to read.<br>Collect temperature, humidity, and pressure readings.<br>2️ Control an OLED Display (Write Mode)<br>Target an OLED display (e.g., SSD1306) and send data for text or images.<br>Update the screen content dynamically.<br>Refresh the display with new data in real-time.<br>3️ onfigure and Read a Device (Write + Read)<br>Write configuration settings to a motion sensor like MPU6050.<br>Switch to Read mode to retrieve accelerometer and gyroscope data.<br>Chain commands to set up and read the device in one go.

Inputs

  • I2C port : Selects which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • I2C Mode : Defines how the device behaves on the bus:<br>Master: The device controls communication, initiating data transfers.<br>Slave: The device waits for instructions from a master device.<br>Max: Configures the device to support both roles with maximum flexibility (advanced use cases).
  • Rx buf len : Sets the size (in bytes) of the receive buffer — the space allocated for storing incoming data. A larger buffer is useful for handling bigger data transfers without losing data.
  • Tx buf len : Sets the size (in bytes) of the transmit buffer — the space allocated for outgoing data. A larger buffer helps when sending more data in one go.
  • Inter flags : Defines how the driver handles interrupts — these are signals that tell the processor to stop and handle I2C events (like data arriving) promptly, improving responsiveness and efficiency.
  • Start : When set to true, the driver starts immediately after setup is complete, making the node ready for communication.

i2c transfer

<b>Handle data exchange with I2C devices by sending or receiving information over the I2C bus. This node manages communication after you’ve set up the driver.</b><br>1️ Read Data from a Sensor (Read Mode)<br>Connect to a temperature sensor like BME280.<br>Set the address and define how many bytes to read.<br>Collect temperature, humidity, and pressure readings.<br>2️ Control an OLED Display (Write Mode)<br>Target an OLED display (e.g., SSD1306) and send data for text or images.<br>Update the screen content dynamically.<br>Refresh the display with new data in real-time.<br>3️ onfigure and Read a Device (Write + Read)<br>Write configuration settings to a motion sensor like MPU6050.<br>Switch to Read mode to retrieve accelerometer and gyroscope data.<br>Chain commands to set up and read the device in one go.

Inputs

  • I2C port : Selects which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Address : Specify the 7-bit address of the target I2C device. Ensure this matches the hardware’s datasheet (e.g., 0x3C for an OLED display or 0x68 for an MPU6050).
  • Read / Write : <br>Read: Pulls data from the device — useful for sensors or data logs.<br>Write: Sends data to the device — like sending commands or configurations.
  • Data : Define the data payload to send (for write operations) or prepare an empty buffer (for read operations). The data type can vary depending on whether the node is in read or write mode.
  • Recieve length : Define the number of bytes the master expects to receive from the slave during an I2C read operation.
  • Start Enable : Enable this to generate a START condition before sending data. This tells all devices on the bus a new communication is beginning — required for most I2C transactions.
  • Stop Enable : Enable this to send a STOP condition after the transfer is complete. This releases the bus so other devices can take control — necessary to finalize most I2C operations.
  • Acknowledge Enable : Enable this to expect an acknowledgment (ACK) from the slave device after sending data. This confirms that the data was received successfully — disabling it is useful for non-standard devices or special protocols.

Outputs

  • data : Define the data payload to send (for write operations) or prepare an empty buffer (for read operations). The data type can vary depending on whether the node is in read or write mode.

i2c driver install

<b>Handle data exchange with I2C devices by sending or receiving information over the I2C bus. This node manages communication after you’ve set up the driver.</b><br>1️ Read Data from a Sensor (Read Mode)<br>Connect to a temperature sensor like BME280.<br>Set the address and define how many bytes to read.<br>Collect temperature, humidity, and pressure readings.<br>2️ Control an OLED Display (Write Mode)<br>Target an OLED display (e.g., SSD1306) and send data for text or images.<br>Update the screen content dynamically.<br>Refresh the display with new data in real-time.<br>3️ onfigure and Read a Device (Write + Read)<br>Write configuration settings to a motion sensor like MPU6050.<br>Switch to Read mode to retrieve accelerometer and gyroscope data.<br>Chain commands to set up and read the device in one go.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • I2C Mode : Defines how the device behaves on the bus:<br>Master: The device controls communication, initiating data transfers.<br><br>Slave: The device waits for instructions from a master device.<br><br>Max: Configures the device to support both roles with maximum flexibility (advanced use cases).<br>
  • Rx buf len : Sets the size (in bytes) of the receive buffer — the space allocated for storing incoming data. A larger buffer is useful for handling bigger data transfers without losing data.
  • Tx buf len : Sets the size (in bytes) of the transmit buffer — the space allocated for outgoing data. A larger buffer helps when sending more data in one go.
  • Inter flags : Defines how the driver handles interrupts — these are signals that tell the processor to stop and handle I2C events (like data arriving) promptly, improving responsiveness and efficiency.
  • Start : When set to true, the driver starts immediately after setup is complete, making the node ready for communication.

i2c driver delete

<b>Release the I2C driver and free up system resources when communication is no longer needed. This node stops the I2C bus and removes the driver configuration, preventing further data transfers until a new driver is installed.</b>

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.

reset tx fifo

<b>Reset the transmit buffer (TX FIFO) on your ESP32’s I2C port to clear any leftover, unsent, or corrupted data. This ensures the next transmission starts with a clean slate, preventing old or partial data from interfering with new transfers.</b>

Inputs

  • I2C port : Select which I2C port (I2C0 or I2C1) to target for resetting the TX buffer.

reset rx fifo

<b>Clear the receive buffer (RX FIFO) on your ESP32’s I2C port to remove any stale, corrupted, or partial data. This prepares the buffer for fresh incoming data, ensuring accurate and clean reads from I2C devices.</b>

Inputs

  • I2C port : Select which I2C port (I2C0 or I2C1) to target for resetting the RX buffer

i2c set pin

<b>Configure the ESP32’s I2C pins to establish a proper connection with I2C devices. This node defines which GPIO pins handle the SDA (data) and SCL (clock) lines, ensuring stable communication by enabling optional pull-up resistors.</b><br>1️ Set Up ESP32 as I2C Master<br>Configure the SDA and SCL pins for an OLED display on GPIO21 and GPIO22.<br>Enable internal pull-ups for clean signals without external resistors.<br>Set I2C mode to Master to control the display and send data.<br>2️ Communicate with Multiple I2C Devices<br>Define SDA and SCL pins on a second I2C bus (e.g., GPIO4 and GPIO5).<br>Set the ESP32 as a Master to talk to both a temperature sensor and an EEPROM on different buses.<br>Enable pull-ups to prevent signal drop-offs.<br>3️ Prepare ESP32 as an I2C Slave<br>Configure GPIO21 and GPIO as SDA and SCL.<br>Set the mode to Slave for listening to commands from a Raspberry Pi acting as the master.<br>Disable pull-ups (false) when external resistors are already in place for more stable communication.

Inputs

  • Config : Configure SDA and SCL pins for I2C communication, referring to the ESP-IDF datasheet.
  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • SDA Pin : Select the GPIO pin to serve as the Serial Data (SDA) line. This pin carries data to and from I2C devices.
  • SCL Pin : Select the GPIO pin to act as the Serial Clock (SCL) line. This pin controls the timing for data transfers.
  • SDA Pullup Enable : Enable or disable an internal pull-up resistor on the SDA pin. Ensure this is enabled (true) if no external pull-up resistor is connected to SDA.
  • SCL Pullup Enable : Enable or disable an internal pull-up resistor on the SCL pin. Turn on (true) for reliable clock signaling when no external pull-up resistor is present.
  • I2C Mode : Master: Control the I2C bus, initiating communication with peripheral devices.<br>Slave: Respond to commands from another master device (less common on ESP32).

i2c get pin

<b>Retrieve the current I2C pin configuration on your ESP32 to verify or reuse settings in other nodes. This node fetches the assigned SDA and SCL pins, along with the active I2C mode, helping you confirm the setup before starting communication.</b><br>1️ Verify I2C Setup Before Data Transfer<br>Read the current SDA and SCL pin assignments to ensure the correct GPIO pins are in use before initializing an OLED display or sensor.<br>Prevent miscommunication due to miswired pins.<br>2️ Check I2C Mode Dynamically<br>Confirm if the ESP32 is in Master or Slave mode before starting an I2C transaction — avoid errors from nodes expecting the wrong mode.<br>3️ Diagnose Misconfigured Hardware<br>Retrieve the current pin setup to compare with expected wiring when devices aren’t responding.<br>Identify mismatched or swapped SDA/SCL pins without manually checking the code or wiring.

Inputs

  • Config : Configure SDA and SCL pins for I2C communication, referring to the ESP-IDF datasheet.

Outputs

  • SDA Pin : Select the GPIO pin to serve as the Serial Data (SDA) line. This pin carries data to and from I2C devices.
  • SCL Pin : Select the GPIO pin to act as the Serial Clock (SCL) line. This pin controls the timing for data transfers.

i2c master write

<b>Transmit data from the ESP32 to an I2C device as the master, writing numeric values directly to the device’s register. This node initiates the write operation, ensuring the target device receives the correct data in 16-bit format — with a byte-sized (uint8) size control.<b/><br>1️ Send Speed Control Data to a Motor Driver<br>Set the device address to 0x40 for a PWM motor driver.<br>Write a uint16 value like 1500 to control motor speed.<br>Size 2 bytes and wait 100 ticks to ensure reliable delivery.<br>2️ Configure Display Brightness on an I2C LED Controller<br>Set the address to 0x60 for an LED controller.<br>Write a single-byte command (0x80) to set brightness mode.<br>Size 1 byte and wait 50 ticks to ensure the command registers properly.<br>3️ Write Multi-Byte Configurations to a Sensor<br>Set the device address to 0x77 for a pressure sensor.<br>Write configuration data (e.g., 0x12, 0x34, 0x56) as a 3-byte payload to define measurement settings.<br>Size 3 bytes and wait 200 ticks to guarantee complete setup.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Device address : Specify the 7-bit address of the target I2C device. Ensure this matches the hardware’s datasheet (e.g., 0x3C for an OLED display or 0x68 for an MPU6050).
  • Write Data : Provide the data to send as a 16-bit unsigned integer (uint16) — supporting values from 0 to 65535. This is useful for devices expecting register data in two bytes (e.g., motor controllers or configuration registers).
  • Size : Define how many bytes to write as an 8-bit unsigned integer (uint8) — supporting values from 0 to 255 bytes.
  • Ticks to wait : Set the maximum time to wait for the write to complete, preventing timeout errors on slower devices or a busy I2C bus.

i2c master read

<b>Fetch data from an I2C device using the ESP32 as the master, retrieving sensor readings, device states, or memory content. This node initiates the read operation, waiting for the specified number of bytes to arrive from the target device.</b><br>1️ Read Temperature Data from a Sensor<br>Set bytes read to 2 to fetch temperature data from an I2C temperature sensor (e.g., 0x68 for an MPU6050).<br>Interpret the two bytes as a 16-bit integer to calculate the temperature.<br>2️ Retrieve OLED Display Status<br>Set bytes read to 1 to query an OLED display’s status register (0x3C).<br>Check if the display is busy or ready for the next command.<br>3️ Read Data from an I2C EEPROM<br>Set bytes read to 4 to fetch a block of data from an EEPROM device (0x50).<br>Combine the bytes into a complete value or decode a stored configuration.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Device address : Specify the 7-bit address of the target I2C device. Ensure this matches the hardware’s datasheet (e.g., 0x3C for an OLED display or 0x68 for an MPU6050).
  • Read Data : Retrieve data from an I2C slave device to the I2C master.
  • Size : Define how many bytes to write as an 8-bit unsigned integer (uint8) — supporting values from 0 to 255 bytes.
  • Ticks to wait : Set the maximum time to wait for the write to complete, preventing timeout errors on slower devices or a busy I2C bus.

Outputs

  • Bytes read : Define how many bytes to retrieve from the I2C device in a single transaction. This is typically determined by the device’s datasheet — common values include 1 byte for status checks, 2 bytes for sensor data (e.g., temperature readings), or multiple bytes for larger datasets (e.g., EEPROM memory).

i2c master write read

<b>Initiate a combined write-then-read operation on the ESP32’s I2C bus, sending a command or memory address to the target device, then immediately fetching the response without releasing the bus. This ensures uninterrupted communication, preventing other devices from interfering between transactions.</b><br>1️ Read Sensor Data from a Specific Register<br>Write the register address (0x0D) to an accelerometer (0x68) and read 2 bytes of data.<br>Ensure continuous communication so the sensor doesn’t reset between commands.<br>2️ Fetch EEPROM Data from a Specific Memory Location<br>Write the memory location (0x10) to an EEPROM (0x50) and read 4 bytes of stored data.<br>Prevent other devices from interrupting while retrieving data.<br>3️ Request Device Status and Configuration in One Go<br>Write a status command (0x05) to an I2C peripheral (e.g., an I2C LED controller 0x60) and read 1 byte of status feedback.<br>Confirm the device is ready before sending further commands.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Device address : Specify the 7-bit address of the target I2C device. Ensure this matches the hardware’s datasheet (e.g., 0x3C for an OLED display or 0x68 for an MPU6050).
  • Write Data : Provide the data to send as a 16-bit unsigned integer (uint16) — supporting values from 0 to 65535. This is useful for devices expecting register data in two bytes (e.g., motor controllers or configuration registers).
  • Size : Define how many bytes to write as an 8-bit unsigned integer (uint8) — supporting values from 0 to 255 bytes.
  • Read Data : Retrieve data from an I2C slave device to the I2C master.
  • Size : Define how many bytes to write as an 8-bit unsigned integer (uint8) — supporting values from 0 to 255 bytes.
  • Ticks to wait : Set the maximum time to wait for the write to complete, preventing timeout errors on slower devices or a busy I2C bus.

Outputs

  • Bytes read : Define how many bytes to retrieve from the I2C device in a single transaction. This is typically determined by the device’s datasheet — common values include 1 byte for status checks, 2 bytes for sensor data (e.g., temperature readings), or multiple bytes for larger datasets (e.g., EEPROM memory).
  • Bytes write : Provide the data to send as a 16-bit unsigned integer (uint16) — supporting values from 0 to 65535. This is useful for devices expecting register data in two bytes (e.g., motor controllers or configuration registers).

i2c set period

<b>Configure the timing behavior of the ESP32’s I2C bus by defining the clock signal's high and low periods. This node fine-tunes the data transfer speed, balancing between faster communication and signal stability.</b><br>1️ Optimize for Faster Sensor Polling<br>Set High Period to 50 and Low Period to 50 to boost the I2C speed, allowing faster data retrieval from sensors like the MPU6050 (0x68) or BME280 (0x76).<br>2️ Ensure Stable Data Transfer for Longer Cables<br>Set High Period to 150 and Low Period to 150 to reduce noise errors when communicating with devices over long wires (e.g., I2C displays or external EEPROM).<br>3️ Balance Speed and Reliability for Mixed-Mode Devices<br>Set High Period to 80 and Low Period to 120 to balance speed and stability when working with multiple devices of varying response speeds (e.g., OLED display + temperature sensor on the same bus).

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • High period : Set the duration (in APB clock cycles) for the clock line (SCL) to stay high during a clock pulse. A higher value increases stability but slows down the communication speed. Default: 100 cycles.
  • Low period : Define how long the clock line stays low per cycle. A longer low period improves noise tolerance but reduces data throughput. Default: 100 cycles.

i2c get period

<b>Retrieve the current I2C clock timing configuration from the ESP32’s I2C controller, fetching the high and low period values. This node helps monitor or validate bus speed settings, ensuring the clock is running as expected.</b><br>1️ Verify Custom Clock Settings<br>Check the high/low periods after using the I2C Set Period node to ensure the clock runs at the intended speed (e.g., 400 kHz fast mode).<br>2️ Monitor Performance for Diagnostics<br>Read the current timing values to log bus speed stability, helping diagnose issues like slow polling rates or data corruption in noisy environments.<br>3️ Adapt Timing for Dynamic Device Control<br>Retrieve the existing I2C period values, then adjust speeds dynamically (e.g., slow down for long cables, speed up for fast sensors) based on conditions or external inputs.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.

Outputs

  • High period : Set the duration (in APB clock cycles) for the clock line (SCL) to stay high during a clock pulse. A higher value increases stability but slows down the communication speed. Default: 100 cycles.
  • Low period : Define how long the clock line stays low per cycle. A longer low period improves noise tolerance but reduces data throughput. Default: 100 cycles.

change i2c filter status

<b>Control the ESP32’s I2C noise filter to improve data reliability by adjusting how many cycles of glitches or noise get ignored. This node helps maintain stable communication, especially in electrically noisy environments or with long cables.</b><br>1️ Filter Noise on Long I2C Cables<br>Set cycle num to 10 and Enable the filter to block noise spikes caused by longer wiring or EM interference near motors.<br>2️ Boost Responsiveness for Fast Sensors<br>Set cycle num to 5 and Disable the filter to speed up response time when working with short, clean connections (e.g., close-range sensors like MPU6050).<br>3️ Adapt I2C Behavior for Mixed Devices<br>Enable the filter with 7 cycles to stabilize communication when combining low-speed devices (e.g., OLED display) with high-speed sensors.<br>Disable it temporarily for fast polling from quick-response peripherals (e.g., ADC converters).

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Cycle num : Define how many APB clock cycles a signal must stay stable to be recognized as valid.<br>Higher values (e.g., 10 or more) filter more noise but may slow bus response.<br>Lower values respond faster but are more sensitive to glitches.
  • Select : Enable: Activates the glitch filter to reject short spikes and noise on SDA/SCL lines.<br>Disable: Turns off filtering, allowing faster response — better for short, clean connections or high-speed devices.

i2c set start timing

<b>Configure the timing of the START condition on the ESP32’s I2C bus by adjusting the setup and hold times. This node ensures devices properly detect the start of communication, preventing missed transmissions or misreads — especially when working with devices running at different speeds or on longer wires.</b><br>1️ Ensure Communication with Slow Devices<br>Set setup time to 8 and hold time to 10 when communicating with older or slower devices like EEPROMs (0x50) that need more time to detect the start.<br>2️ Speed Up Data Transfers for Fast Sensors<br>Set setup time to 3 and hold time to 3 when polling high-speed sensors like MPU6050 accelerometers (0x68) to reduce latency.<br>3️ Stabilize Timing for Mixed-Speed Devices<br>Set setup time to 6 and hold time to 7 when working with multiple devices on the same bus — ensuring reliable starts across both fast (sensors) and slow (OLED displays) peripherals.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Setup time : Define the number of APB clock cycles the SDA line holds low before the SCL line drops — marking the start of communication.<br>Higher values improve stability for slower or noise-prone devices.<br>Lower values speed up transactions for faster peripherals.
  • Hold time : Specify how long the SDA line stays low after the clock drops to hold the START condition.<br>Higher values help ensure slower devices recognize the start.<br>Lower values boost responsiveness for fast peripherals.

i2c get start timing

<b>Retrieve the current START condition timing configuration from the ESP32’s I2C controller, reading the setup and hold times. This node helps monitor timing settings, diagnose bus issues, or log performance data to ensure proper device synchronization.</b><br>1️ Verify Timing After Dynamic Configuration<br>Confirm the setup and hold times after using the I2C Set Start Timing node to ensure custom timing settings are correctly applied — preventing communication errors with sensitive devices.<br>2️ Log and Diagnose Bus Behavior<br>Read the current timing values to track how the ESP32's I2C timing behaves under different conditions, helping diagnose errors like devices missing the start due to mismatched timing.<br>3️ Adapt Timing for Auto-Tuning<br>Retrieve the existing setup/hold times, compare them to an expected baseline, and adjust other I2C timing nodes (e.g., Set Start Timing or Set Stop Timing) to optimize communication dynamically.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.

Outputs

  • Start hold time : Start and Specify how long the SDA line stays low after the clock drops to hold the START condition.<br>Higher values help ensure slower devices recognize the start.<br>Lower values boost responsiveness for fast peripherals.
  • Start setup time : Start and Define the number of APB clock cycles the SDA line holds low before the SCL line drops — marking the start of communication.<br>Higher values improve stability for slower or noise-prone devices.<br>Lower values speed up transactions for faster peripherals.

i2c set stop timing

<b>Control the timing of the STOP condition on the ESP32’s I2C bus by configuring setup and hold times. This node ensures devices properly detect the end of communication, preventing data corruption or missed acknowledgments — especially when working with different-speed devices.</b><br>1️ Ensure Reliable Communication with EEPROMs<br>Set setup time to 8 and hold time to 10 when writing data to slow peripherals like EEPROM memory (0x50) to ensure the stop is correctly recognized.<br>2️ Speed Up High-Frequency Sensor Reads<br>Set setup time to 3 and hold time to 3 when polling fast sensors like the MPU6050 (0x68) to minimize downtime between read cycles.<br>3️ Stabilize Timing for Mixed-Speed Devices<br>Set setup time to 6 and hold time to 7 when communicating with a mix of slow devices (OLED displays) and faster peripherals on the same bus, balancing speed and reliability.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Setup time : Define the number of APB clock cycles the SDA line holds low before the SCL line drops — marking the start of communication.<br>Higher values improve stability for slower or noise-prone devices.<br>Lower values speed up transactions for faster peripherals.
  • Hold time : Specify how long the SDA line stays low after the clock drops to hold the START condition.<br>Higher values help ensure slower devices recognize the start.<br>Lower values boost responsiveness for fast peripherals.

i2c get stop timing

<b>Retrieve the current STOP condition timing settings from the ESP32’s I2C controller by reading the configured setup and hold times. This node helps validate timing configurations, diagnose communication errors, and ensure devices correctly recognize the end of a transaction.</b><br>1️ Verify Timing After Dynamic Adjustments<br>Check setup and hold times after modifying them with I2C Set Stop Timing to ensure they were correctly applied, preventing miscommunication with peripherals.<br>2️ Log and Diagnose I2C Timing Issues<br>Monitor STOP timing values in real time to debug failed transactions, ensuring the ESP32 properly terminates communication without unexpected bus conflicts.<br>3️ Adapt Timing for Multi-Speed Device Support<br>Retrieve the current STOP timing values, compare them to expected values, and adjust other I2C timing settings dynamically for optimized performance when using both fast and slow peripherals on the same bus.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.

Outputs

  • Stop hold time : Specify how long the SDA line stays low after the clock drops to hold the START condition.<br>Higher values help ensure slower devices recognize the start.<br>Lower values boost responsiveness for fast peripherals.
  • Stop setup time : Define the number of APB clock cycles the SDA line holds low before the SCL line drops — marking the start of communication.<br>Higher values improve stability for slower or noise-prone devices.<br>Lower values speed up transactions for faster peripherals.

i2c set data timing

<b>Define the data sampling and holding timing for the ESP32’s I2C bus to ensure stable data transmission, especially when working with devices that require precise timing. This node helps fine-tune data validity windows, reducing errors from signal noise or mismatched speeds.</b><br>1️ Stabilize Data on Noisy Lines<br>Set sample time to 10 and hold time to 12 when using long wires or working in noisy environments to reduce misreads.<br>2️ Optimize High-Speed Sensor Data<br>Set sample time to 3 and hold time to 4 when reading from high-speed sensors like MPU6050 (0x68) to boost throughput without sacrificing stability.<br>3️ Ensure Compatibility with Legacy Devices<br>Set sample time to 8 and hold time to 10 for older peripherals like 24Cxx EEPROMs (0x50) that need extra time to process data changes.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Sample time : Set the number of APB clock cycles after the clock signal goes high when the SDA line is sampled. A longer sample time helps avoid glitches or false reads on noisy lines.
  • Hold time : Specify how long the SDA line stays low after the clock drops to hold the START condition.<br>Higher values help ensure slower devices recognize the start.<br>Lower values boost responsiveness for fast peripherals.

i2c get data timing

<b>Retrieve the current data sampling and hold timing settings from the ESP32’s I2C controller to analyze or validate timing behavior. This node helps monitor timing configurations, debug unstable transmissions, and ensure peripherals are synchronized correctly.</b><br>1️ Validate Timing After Adjustments<br>Confirm the setup after modifying data timing with I2C Set Data Timing to ensure the new sample and hold times were correctly applied.<br>2️ Diagnose Communication Errors<br>Check data timing values to identify timing mismatches when troubleshooting issues like corrupted data or devices failing to respond.<br>3️ Monitor Timing for Multi-Device Setups<br>Track timing behavior when running a mix of fast and slow I2C peripherals — ensuring the current timing values balance performance and stability.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.

Outputs

  • Hold data time : Specify how long the SDA line stays low after the clock drops to hold the START condition.<br>Higher values help ensure slower devices recognize the start.<br>Lower values boost responsiveness for fast peripherals.
  • Sample data time : Set the number of APB clock cycles after the clock signal goes high when the SDA line is sampled. A longer sample time helps avoid glitches or false reads on noisy lines.

i2c set timeout

<b>Configure the timeout duration for the ESP32’s I2C bus to prevent the controller from hanging during stalled or unresponsive transactions. This node helps ensure reliable communication, avoiding indefinite waits when a device fails to respond.</b><br>1️ Prevent System Freeze with Faulty Devices<br>Set timeout to 50000 cycles when working with unreliable sensors or peripherals, ensuring the ESP32 moves on after a failed communication attempt.<br>2️ Speed Up Failure Detection in Critical Systems<br>Set timeout to 5000 cycles when monitoring critical devices (e.g., safety sensors) to quickly detect unresponsive hardware and trigger fallback actions.<br>3️ Support Slow-Responding Peripherals<br>Set timeout to 100000 cycles when communicating with older or slower devices, preventing premature disconnection errors.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Time : Define the maximum number of APB clock cycles the ESP32 will wait for a response before terminating the transaction.<br>Longer durations accommodate slow or busy devices.<br>Shorter durations speed up error handling when a device is disconnected or unresponsive.

i2c get timeout

<b>Retrieve the current timeout configuration from the ESP32’s I2C controller to monitor or validate how long the bus waits for a response before aborting a transaction. This node helps ensure timing settings are correct and aids troubleshooting when devices become unresponsive.</b><br>1️ Verify Timeout Settings After Configuration<br>Check the timeout value after using I2C Set Timeout to ensure the configuration was applied correctly.<br>2️ Diagnose Stalled Transactions<br>Inspect the current timeout to identify whether a too-short timeout is cutting off slow devices or a too-long timeout delays error recovery.<br>3️ Log and Adapt Timeout for Dynamic Systems<br>Read the timeout value before switching to a different I2C device setup, ensuring the bus timeout is optimized for the next set of peripherals.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.

Outputs

  • Time out : Define the maximum number of APB clock cycles the ESP32 will wait for a response before terminating the transaction.<br>Longer durations accommodate slow or busy devices.<br>Shorter durations speed up error handling when a device is disconnected or unresponsive.

i2c set data mode

<b>Configure the transmission and reception bit order for the ESP32’s I2C bus to ensure data is interpreted correctly by the connected devices. This node helps adapt communication to devices that require specific bit-endianness for reading and writing data.</b><br>1️ Communicate with Standard I2C Sensors<br>Set both TX Trans Mode and RX Trans Mode to MSB when connecting to sensors like the BME280 or MPU6050, ensuring data is interpreted as expected.<br>2️ Integrate Custom Devices with LSB Order<br>Configure TX Trans Mode to LSB when interfacing with a custom I2C peripheral that expects least significant bits first for data writing.<br>3️ Process Bit-Reversed Data from Non-Standard Modules<br>Switch RX Trans Mode to LSB when reading data from an unusual I2C module that transmits data in a reverse-bit order format.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.
  • Tx trans mode : Set the transmission bit order (how data is sent from the ESP32):<br>MSB (Most Significant Bit): Send the most significant bit first (default for most I2C devices).<br>LSB (Least Significant Bit): Send the least significant bit first — used in specialized devices or custom protocols.
  • Rx trans mode : Define the reception bit order (how data is received):<br>MSB (Most Significant Bit): Interpret the most significant bit first — default behavior for standard I2C devices.<br>LSB (Least Significant Bit): Interpret the least significant bit first, useful for non-standard peripherals.

i2c get data mode

<b>Retrieve the current transmission and reception bit order from the ESP32’s I2C controller to verify how data is sent and received. This node helps confirm the bit order settings, ensuring data is processed correctly, especially when dealing with non-standard devices.</b><br>1️ Verify Configuration After Setup<br>Ensure the bit order was applied correctly after using the I2C Set Data Mode node — preventing miscommunication with connected devices.<br>2️ Troubleshoot Data Misreads<br>Check whether an unexpected device response is due to incorrect bit order settings, especially when data looks reversed or corrupted.<br>3️ Log and Adapt for Device Changes<br>Retrieve the bit mode settings before switching to a new device, ensuring the bus is configured properly for the next peripheral.

Inputs

  • I2C port : Select which I2C hardware port to use — I2C0 or I2C1. This depends on your hardware setup and which pins are connected to your peripherals.

Outputs

  • Tx trans mode : Set the transmission bit order (how data is sent from the ESP32):<br>MSB (Most Significant Bit): Send the most significant bit first (default for most I2C devices).<br>LSB (Least Significant Bit): Send the least significant bit first — used in specialized devices or custom protocols.
  • Rx trans mode : Define the reception bit order (how data is received):<br>MSB (Most Significant Bit): Interpret the most significant bit first — default behavior for standard I2C devices.<br>LSB (Least Significant Bit): Interpret the least significant bit first, useful for non-standard peripherals.

change i2c master status

<b>Control whether the ESP32’s I2C bus operates as a master or releases control to another master. This node helps manage multi-master setups, allowing dynamic role changes for more adaptive communication.</b><br>1️ Switch ESP32 to Backup Master Mode<br>Disable master status when running a backup ESP32 that takes control only if the primary fails — ideal for redundant systems.<br>2️ Coordinate Multi-Master Communication<br>Toggle master status dynamically when sharing the I2C bus between two ESP32 boards handling different sensors or tasks.<br>3️ Prepare ESP32 as a Fallback Device<br>Enable master status on demand after checking if the current master has stalled or disconnected, ensuring reliable data collection resumes.

Inputs

  • Config : Configure SDA and SCL pins for I2C communication, referring to the ESP-IDF datasheet.
  • Start / Stop : Initiates (Start) or terminates (Stop) communication on the I2C bus, signaling the beginning or end of data transfer.

i2c command master write

<b>Initiate a data transmission from the ESP32’s I2C master to a connected slave device. This node sends specific commands or data, controlling peripherals like sensors, displays, or actuators.</b><br>1️ Send Configuration Commands to a Sensor<br>Write initialization settings to a BME280 sensor at address 0x76, ensuring correct measurement modes are activated.<br>2️ Control an I2C Display Module<br>Transmit display commands to an OLED screen, like turning on pixels or changing brightness.<br>3️ Trigger an I2C Actuator<br>Send data to an I2C relay module to toggle power on or off to external hardware.

Inputs

  • Config : Define a unique, recognizable name for this command sequence — enabling you to reuse or chain commands seamlessly within your flow.
  • Write Data : Provide the data to send as a 16-bit unsigned integer (uint16) — supporting values from 0 to 65535. This is useful for devices expecting register data in two bytes (e.g., motor controllers or configuration registers).
  • Size : Define how many bytes to write as an 8-bit unsigned integer (uint8) — supporting values from 0 to 255 bytes.
  • Acknowledge Enable : Enable this to expect an acknowledgment (ACK) from the slave device after sending data. This confirms that the data was received successfully — disabling it is useful for non-standard devices or special protocols.

i2c command master write byte

<b>Send a single byte of data from the ESP32’s I2C master to a connected slave device. This node simplifies communication by transmitting quick control commands or configuration data to peripherals.</b><br>1️ Configure an I2C Sensor<br>Send a command byte to a BME280 sensor to switch it from sleep mode to normal operation.<br>2️ Control an OLED Display<br>Transmit a control byte to an SSD1306 OLED screen to invert display colors or toggle display on/off.<br>3️ Trigger a Motor Driver<br>Send a byte to a DRV8830 motor controller to set speed or change rotation direction using a single byte of data.

Inputs

  • Config : Define a unique, recognizable name for this command sequence — enabling you to reuse or chain commands seamlessly within your flow.
  • Write Data : Provide the data to send as a 16-bit unsigned integer (uint16) — supporting values from 0 to 65535. This is useful for devices expecting register data in two bytes (e.g., motor controllers or configuration registers).
  • Acknowledge Enable : Enable this to expect an acknowledgment (ACK) from the slave device after sending data. This confirms that the data was received successfully — disabling it is useful for non-standard devices or special protocols.

i2c command master read

<b>Read data from a connected I2C slave device using the ESP32 as the master. This node controls how the ESP32 acknowledges data after each byte, ensuring smooth communication and proper data reception.</b><br>1️ Read Sensor Data Continuously<br>Set master ack to keep reading temperature data from a BME280 sensor until all bytes are received.<br>2️ Retrieve a Single Byte Response<br>Use master nack to read one status byte from a PCF8574 I/O expander, then end the transaction immediately.<br>3️ Fetch Data Blocks from an EEPROM<br>Combine master ack with master last nack to read multiple bytes from an AT24C32 EEPROM, stopping only after the last byte is retrieved.

Inputs

  • Config : Define a unique, recognizable name for this command sequence — enabling you to reuse or chain commands seamlessly within your flow.
  • Read Data : Retrieve data from an I2C slave device to the I2C master.
  • Size : Define how many bytes to write as an 8-bit unsigned integer (uint8) — supporting values from 0 to 255 bytes.
  • Acknowledge : Determine how the ESP32 responds to the slave after receiving a byte:<br>master ack: Send an ACK (acknowledge) to request more data from the slave.<br>master nack: Send a NACK (not acknowledge) to end the read transaction.<br>master last nack: Send a NACK only after the last byte, signaling the slave to stop sending.<br>master ack max: Send an ACK for all bytes until the buffer limit is reached.

i2c command master read byte

<b>Retrieve a single byte of data from an I2C slave device using the ESP32 as the master. This node controls how the master acknowledges the byte, determining whether to continue or end communication.</b><br>1️ Read Status Byte from a Sensor<br>Use master nack to read a status byte from an HTU21D humidity sensor and end the communication immediately.<br>2️ Poll a Device for Ready Status<br>Set master ack to read a ready byte from a PCF8574 I/O expander, allowing continuous polling until the device signals it's ready.<br>3️ Receive Configuration Byte from EEPROM<br>Combine master ack and master last nack to fetch a configuration byte from an AT24C32 EEPROM, ending cleanly after the final byte.

Inputs

  • Config : Define a unique, recognizable name for this command sequence — enabling you to reuse or chain commands seamlessly within your flow.
  • Read Data : Retrieve data from an I2C slave device to the I2C master.
  • Acknowledge : Determine how the ESP32 responds to the slave after receiving a byte:<br>master ack: Send an ACK (acknowledge) to request more data from the slave.<br>master nack: Send a NACK (not acknowledge) to end the read transaction.<br>master last nack: Send a NACK only after the last byte, signaling the slave to stop sending.<br>master ack max: Send an ACK for all bytes until the buffer limit is reached.

<b>Free the memory allocated for an I2C command link on the ESP32. This node ensures proper cleanup after creating and executing command sequences, preventing memory leaks or stale commands.</b><br>1️ Clean Up After a Multi-Step Command<br>Build an I2C sequence to initialize an OLED screen, then delete the link to free resources immediately after execution.<br>2️ Reset Communication State<br>Delete the command link after a failed read from an I2C temperature sensor to ensure the next command starts fresh.<br>3️ Optimize Memory Usage in Loops<br>Create and send repeated commands to an EEPROM module, deleting the link after each iteration to avoid memory buildup.

Inputs

  • Config : Define a unique, recognizable name for this command sequence — enabling you to reuse or chain commands seamlessly within your flow.