
Is the power supply adequate? How are you powering it, and how much current can the 5v supply deliver?
Do you have pull-up resistors on SDA/SCL? If not, you can try:
Code: Select all
i2c = machine.I2C(sda=machine.Pin(SDA_PIN, pull=machine.pin.PULL_UP), scl=machine.Pin(SCL_PIN, pull=machine.Pin.PULL_UP), freq=400000)