RP2040 firmware converts Raspberry Pi Pico into a an I2C to USB bridge

Nicolai Electronics’ rp2040-ic2-interface open-source firmware for the Raspberry Pi Pico (or other Raspberry Pi RP2040 boards) converts the board into an I2C to USB bridge to connect any I2C sensor or module to a PC or other hardware without GPIOs.

The firmware implements the USB protocol expected by the I2C-Tiny-USB kernel driver used by the original I2C-Tiny-USB project for Microchip ATMega 8-bit AVR microcontrollers. The RP2040 is however not a fork of the original project, but instead a complete re-implementation of the firmware.

RP2040 firmware I2C USB bridge

You’ll need to connect your I2C sensor, display, or another module to the SDA (GPIO 2) and SCL (GPIO 3) pins of the Raspberry Pi RP2040 microcontroller and flash the “pre-release” firmware to the board. You’ll find it together with the source code written in C language on GitHub. Note the project has a “proof of concept status” and more testing is needed to make sure that everything works as expected.

The project is best used with a Linux host as the i2c-tiny-usb kernel part of the official kernel source tree. I could load it easily on Ubuntu 20.04:


But you’ll also find drivers for Windows and macOS and documentation on the aforelinked I2C-Tiny-USB project. Once you attach the RP2040 board to your host through a USB cable, the I2C sensor/module should be visible with standard client applications such as the ones found in the lm_sensors framework (sensors-detect, sensors, etc…).

Via Hackster.io

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

One Reply to “RP2040 firmware converts Raspberry Pi Pico into a an I2C to USB bridge”

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC