Git Product home page Git Product logo

pico_i2c_slave's Introduction

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

Links

Authors

Valentin Milea [email protected]

pico_i2c_slave's People

Contributors

vmilea avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.