No, that is how to set up software I2C. To set up hardware I2C you need to specify the bus number. The pins are defined in hardware.rp346@njit.edu wrote: ↑Sun Sep 16, 2018 6:57 pm...
Is this correct way to access HW I2C.
import tsl2561
from machine import Pin, I2C
i2c = machine.I2C(scl = machine.Pin(12), sda = machine.Pin(13), freq = 10000)
sensor = tsl2561.TSL2561(i2c)
sensor.read()
Code: Select all
i2c = machine.I2C(1)