Author Topic: How can I communicate with 2 raspberry pi I2C  (Read 2086 times)

0 Members and 1 Guest are viewing this topic.

Offline rdvncrtTopic starter

  • Newbie
  • Posts: 7
  • Country: tr
How can I communicate with 2 raspberry pi I2C
« on: August 08, 2023, 10:10:33 am »
I want to communicate with i2c between 2 raspberry picos. My code and explanations are in the images. But I can't see the other raspberry pico. How can I solve it?

 

Offline jan28

  • Contributor
  • Posts: 43
  • Country: nl
Re: How can I communicate with 2 raspberry pi I2C
« Reply #1 on: August 08, 2023, 02:27:26 pm »
Hello,

You are using both Pico's as master. One needs to be master the other one slave. The master controls the send/receive direction.

Replace your first code with something like shown in (to make it a slave and wait for send/receive commands from the master):
- https://forums.raspberrypi.com//viewtopic.php?t=302978#p1823668
- https://python-academia.com/en/raspberry-pi-pico-slave/
 
The following users thanked this post: rdvncrt

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 800
  • Country: lt
Re: How can I communicate with 2 raspberry pi I2C
« Reply #2 on: August 09, 2023, 03:41:56 pm »
The bottom board on the breadboard is also not powered?  :-//
 

Offline rdvncrtTopic starter

  • Newbie
  • Posts: 7
  • Country: tr
Re: How can I communicate with 2 raspberry pi I2C
« Reply #3 on: August 10, 2023, 06:47:06 am »
When I tried the codes in the links it worked thank you
 

Offline rdvncrtTopic starter

  • Newbie
  • Posts: 7
  • Country: tr
Re: How can I communicate with 2 raspberry pi I2C
« Reply #4 on: August 10, 2023, 06:48:43 am »
The bottom board on the breadboard is also not powered?  :-//

The power cord wasn't plugged in when I took the photo, I'm powering it up.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf