You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking to replicate your setup but with a Wemos D1 Mini instead of the Uno.
Everything looks to be working from the D1 seide, but the Pico side throws an error when the programme is run
Traceback (most recent call last):
File "<stdin>", line 18, in <module>
OSError: [Errno 5] EIO
The code running on the Pico is as follows - some adaptations from your original to help with debugging
from machine import Pin, I2C
from time import sleep
MSG_SIZE = 15
i2c = I2C(0, scl=Pin(17), sda=Pin(16), freq=100000)
devices = i2c.scan()
if len(devices) == 0:
print("No I2C device found")
elif len(devices) > 1:
print("Multiple I2C devices found -")
for d in devices:
print(" 0x{:02X}".format(d))
else:
print("I2C device found at 0x{:02X}".format(devices[0]))
device = devices[0]
i2c.writeto(0x09, 'Hi from Pi')
sleep(0.1)
a = i2c.readfrom(0x09, MSG_SIZE)
print(a)
print("done")
The Pico is able to find the Wemos as an I2C peripheral
I2C device found at 0x09
but is unable to write to it. Any help gratefully appreciated, your youtube video on the topic was incredibly helpful.
The text was updated successfully, but these errors were encountered:
I'm looking to replicate your setup but with a Wemos D1 Mini instead of the Uno.
Everything looks to be working from the D1 seide, but the Pico side throws an error when the programme is run
The code running on the Pico is as follows - some adaptations from your original to help with debugging
The Pico is able to find the Wemos as an I2C peripheral
but is unable to write to it. Any help gratefully appreciated, your youtube video on the topic was incredibly helpful.
The text was updated successfully, but these errors were encountered: