I tried to connect the lcd1602(V2.0) to a PICO plugged into the grove shield, I can detect it through i2c.scan using the IC20 of the shield. I can get the LCD1602 address and can subsequently send text to it, no problem.
I use (i2c = I2C(0, scl=Pin(9), sda=Pin(8), freq=400000)
When I try to do the same through the I2C0 of the shield, no detection, this is true with any sensor.
I use (i2c = I2C(1, scl=Pin(7), sda=Pin(6), freq=400000)
I have tried with sda=2 & scl=3, sda=10 & scl=11, sda=14 & scl=15, sda=18 & scl=19, sda=26 & scl=27), none works.
I do not know what else can be wrong. I am just starting to work with the pico and shield but tried to make this work for the past 2 days, please forgive something obvious I may have missed!
Thank for your input. After giving up since my initial message, your input made me work on it again. I am still very confused and at a beginner stage, but, although it did not work with your exact code it got me thinking and it seems now to behave with a tiny change. The code (yours with a tiny tiny change) I used is provided bellow:
import machine
sda=machine.Pin(6)
scl=machine.Pin(7)
#so in essence I have just replaced the 0 by a 1
i2c=machine.I2C(1,sda=sda, scl=scl, freq=400000)
Hello Carlos,
I am not sure where you are with it but Seed_Huang prompted me to try again and it works for me.
I am still very fragile on the subject but shuffling things around, I may be able to provide help.
Please let me know, I ll be happy to try to help.
I wanted to add, it seems like something happens when for example I run the scan (the code I used from you ). IF I run another code that uses the I2C I get an OSError: [Errno 5] EIO and the only way to make it work is to unplug and re-plug the pico, any idea why that is?
Many thanks