Use your XIAO ESP32-S3 to create a USB to I2C Bridge to connect to your I2C Peripherals. Everything is done in your browser: flash it with ESP32 Bit Pirate, put it into BPIO2 mode, and have UXB-300 read and write any I2C or SPI peripheral with no additional code changes. This example uses the LPS22, and you'll be polling it in no time without writing a single line of code. You read and write it by register name and real units instead of raw bytes, which makes bring-up and tuning fast.
Hardware Used:
Board: Seeed XIAO ESP32-S3
Expansion Board (optional): Seeed XIAO Expansion Board
Sensor: Adafruit LPS22 Pressure Sensor - STEMMA QT
Cable: Grove to STEMMA QT Cable - 100mm (also at DigiKey)
USB-C data cable
Links to Firmware and GUI:
Firmware: ESP32 Bit Pirate Web Flasher (thanks to geo-tp for the ESP32 Bit Pirate project)
Terminal: Bit Pirate Web Serial Terminal
GitHub: ESP32S3_BPIO2_I2CBridge
GUI: UXB-300 (Chrome or Edge on desktop)
Set up the XIAO: ( Flash | BPIO2 )
Flash: Open the web flasher in Chrome or Edge. Hold BOOT on the XIAO while you plug in USB, select Xiao ESP32-S3, then click Flash selected firmware.
BPIO2: Open the web serial terminal, click Connect and press any key. Then type:
HIZ> mode Mode Number > 12 Configure SD card GPIOs for USB? [n]: <Enter> USB> adapters Enter index (default 9): 8 BPIO2 GPIOs IO0..IO7 [1 2 4 3 6 5 0 7]: 1 6 5 7 2 4 3 0
The XIAO reboots into BPIO2 adapter mode and the terminal closes. The GPIO list puts I2C on GPIO6 (SCL) and GPIO5 (SDA), the expansion board's Grove I2C port. Press RESET to return to normal Bit Pirate mode.
NOTE: Avoid pressing RESET while you're using UXB-300. A reset takes the XIAO out of BPIO2 mode, and you'd have to repeat the BPIO2 step above to get it back.
Plug the Grove end of the cable into the expansion board's I2C Grove port and the STEMMA QT end into the LPS22.
Try it now:
UXB-300 LPS22 GUI: https://apps.labs16.com/lightwoheat/BPIO2_I2C_LPS22
With the XIAO in BPIO2 mode and the LPS22 plugged in, open the link above. On the Connection page, click Connect, pick ESP32 Bit Pirate, and click Connect.
On the Model page, click Write All (top left) to configure the LPS22, then turn on Polling. TempC and TempF update live.
Make it yours:
Register free to unlock the Factory Projects catalog of ready-made ICs, then save and tweak your own copy.
Open UXB-300, click Create, then Browse and Register / Sign In.
Signed in, Select the LPS22HB, set Device ID to 0x5D, choose Bus/Bit Pirate BPIO2 I2C and click Create.
On the Connection page, click Connect and pick ESP32 Bit Pirate. Click Scan: 0x3C and 0x51 are the OLED and RTC on the expansion board, and 0x5D is the LPS22.
NOTE: On the Seeed XIAO expansion board, IO4 (D1, GPIO2) and IO7 (GPIO0) are connected to hardware on that board and don't stay at HiZ on their own. Set both to HiZ in the panel before you scan. Wired straight to the XIAO? You can skip this.
Set the Device Address to 0x5D.
A fresh project starts the LPS22 at its power-on defaults, so wake it up: in Backstage, type 40 into CTRL_REG1 (0x10) and press Enter.
Read registers 0x28–0x2C for the raw pressure and temperature bytes.
To watch them live, open the Editor, change Access on 0x28–0x2C from Read to Poll and set the Poll Rate (500 ms is a good start).
Then switch on P under Transactions.
That's it: the pressure and temperature calculations now update in real time.
Step by step (no account):
Rather not sign in? Build the LPS22 model yourself. In UXB-300, click Create, then Browse and Continue without (Custom). Name your project, set Device ID to 0x5D, choose Bus/Bit Pirate BPIO2 I2C and click Create. The BPIO2 dongle is built in, so there are no packets to define.
In the Editor, click + under IC Registers.
Enter the addresses f-12, 27-2c and click Create.
Click register 0x10 and set Name to CTRL_REG1, Access to r/w immediate and Packet to One Byte. Name 0x0F WHO_AM_I, 0x2B TEMP_OUT_L and 0x2C TEMP_OUT_H the same way.
Click the Gear icon and select Multi-Registers.
Click + to add a multi-register for temperature.
Name it Temperature and add TEMP_OUT_H (1) and TEMP_OUT_L (0), bits 7-0, to form the 16-bit value.
Click the pencil next to Parameter and add the converters: value * 0.01 for TempC and value * 0.01 * 1.8 + 32 for TempF.
Now connect, scan and set the address to 0x5D as in Make it yours above. Write 40 to CTRL_REG1, switch on P under Transactions, and TempC and TempF update live.
Save your project so you can load it again later.
Next Steps:
Add pressure: create a multi-register from PRESSURE_OUT_XL, PRESSURE_OUT_L and PRESSURE_OUT_H (0x28 to 0x2A) and set the converter to value/4096 for hPa.
The same GPIO list also gives you SPI (IO0 to IO3), so try an SPI sensor next.
We'd love your feedback - and let us know what other examples you'd like to see.
This page (XIAO ESP32-S3 Bit Pirate as I2C Bridge with GUI Control) was last updated on October 25, 2026.