i2c communicate between circuitpython boards

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
gsrobotics2017
 
Posts: 9
Joined: Wed Jul 14, 2021 4:20 pm

i2c communicate between circuitpython boards

Post by gsrobotics2017 »

don't know if I'm in the right place but iv got a pyportal Titano and a feather 2040 I am trying to communicate between the 2 with i2c but can't find any way to do this I'm happy to move to a different communication method lice UART or USB but I can't find anything on this ether does anyone have any advice?

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2c communicate between circuitpython boards

Post by dastels »

You can use the i2cperipheral module. See the docs as https://circuitpython.readthedocs.io/en ... index.html.

The Feather RP2040 doesn't include i2cperipheral in its CircuitPython build, but the Titano does. So the Titano will have to be the peripheral and the Feather, the host.

See https://circuitpython.readthedocs.io/en ... atrix.html for which core modules are included on each board.

Dave

User avatar
gsrobotics2017
 
Posts: 9
Joined: Wed Jul 14, 2021 4:20 pm

Re: i2c communicate between circuitpython boards

Post by gsrobotics2017 »

do you know any way of adding this module to the father 2040

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2c communicate between circuitpython boards

Post by dastels »

I do not. There's an open issue to add it, but it's a low priority at the moment: https://github.com/adafruit/circuitpython/issues/4536.

Dave

User avatar
gsrobotics2017
 
Posts: 9
Joined: Wed Jul 14, 2021 4:20 pm

Re: i2c communicate between circuitpython boards

Post by gsrobotics2017 »

do you understand how that paceg works

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2c communicate between circuitpython boards

Post by dastels »

"paceg"??

Dave

User avatar
gsrobotics2017
 
Posts: 9
Joined: Wed Jul 14, 2021 4:20 pm

Re: i2c communicate between circuitpython boards

Post by gsrobotics2017 »

the i2cperipheral pacage

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2c communicate between circuitpython boards

Post by dastels »

"package"

In this case it's more correctly referred to as a module.

As for how it works. I linked to the docs which includes an example. From the other device (with sda, scl, and ground connected between the two boards) you use it like any I2C device, based on how you programmed it to respond.

That, as far as I know, is the extent of it.

Dave

User avatar
gsrobotics2017
 
Posts: 9
Joined: Wed Jul 14, 2021 4:20 pm

Re: i2c communicate between circuitpython boards

Post by gsrobotics2017 »

I looked at the documentation but i cant understand it

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2c communicate between circuitpython boards

Post by dastels »

Is there anything in particular that is a problem?

Dave

User avatar
gsrobotics2017
 
Posts: 9
Joined: Wed Jul 14, 2021 4:20 pm

Re: i2c communicate between circuitpython boards

Post by gsrobotics2017 »

i just don't understand the documentations

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”