@ws1088 said in Connecting Env Unit and RFID Unit via Grove Hub on M5StickC:
I use the following code to test:
from m5stack import *
from m5ui import *
from uiflow import *
import i2c_bus
setScreenColor(0x111111)
devices = None
scan = None
i2c0 = i2c_bus.easyI2C(i2c_bus.PORTA, 0x68)
devices = []
while True:
scan = i2c0.scan()
if devices != scan:
lcd.clear()
lcd.print(str(scan), 0, 0, 0xffffff)
devices = scan
wait_ms(2)
I can see the I2C addresses for the Env unit and RFID unit combinations when I plug them into the Grove Hub. I can plug the Env unit in to see addresses 92 and 118, then add RFID unit to see [40, 92, 118] etc.
So I am pretty clueless why the following will fail:
rfid0 = unit.get(unit.RFID, unit.PORTA)
env1 = unit.get(unit.ENV, unit.PORTA)
Looks like I need to go to the source code and see what's going on...
are modules working ok on their own and you see issue when both connected?