1
0
mirror of https://github.com/exA-Arcadia/exa-io.git synced 2024-11-27 23:50:51 +01:00
exa-io/firmware/third_party/pico_i2c_slave
Thomas Daede abffe47e52 Add edid emulation support.
Uses third party pico_i2c_slave library.
2023-02-07 02:01:57 -08:00
..
example_mem Add edid emulation support. 2023-02-07 02:01:57 -08:00
example_mem_wire Add edid emulation support. 2023-02-07 02:01:57 -08:00
i2c_slave Add edid emulation support. 2023-02-07 02:01:57 -08:00
LICENSES Add edid emulation support. 2023-02-07 02:01:57 -08:00
.clang-format Add edid emulation support. 2023-02-07 02:01:57 -08:00
.gitignore Add edid emulation support. 2023-02-07 02:01:57 -08:00
CMakeLists.txt Add edid emulation support. 2023-02-07 02:01:57 -08:00
pico_sdk_import.cmake Add edid emulation support. 2023-02-07 02:01:57 -08:00
README.md Add edid emulation support. 2023-02-07 02:01:57 -08:00

I2C slave library for the Raspberry Pi Pico

The Raspberry Pi Pico C/C++ SDK has all you need to write an I2C master, but is curiously lacking when it comes to I2C in slave mode. This library fills that gap to easily turn the Pico into an I2C slave.

Examples

An example program is included where the slave acts as a 256 byte external memory. See example_mem.

For those who prefer the Wire API commonly used with Arduino, there is a second version on top of a Wire wrapper. See example_mem_wire.

To keep it simple, both master and slave run on the same board. Just add jumpers between the two I2C instances: GP4 to GP6 (SDA), and GP5 to GP7 (SCL).

Setup

Follow the instructions in Getting started with Raspberry Pi Pico to setup your build environment. Then:

  • git clone https://github.com/vmilea/pico_i2c_slave
  • cd pico_i2c_slave
  • mkdir build, cd build, cmake ../, make
  • copy example_mem/example_mem.uf2 to Raspberry Pico
  • open a serial connection and check output

Authors

Valentin Milea valentin.milea@gmail.com