Code: Select all
import machine
i2c = machine.I2C(0, sda=machine.Pin(8), scl=machine.Pin(9))
i2c.scan()
Code: Select all
import machine
i2c=machine.I2C(0, sda=machine.Pin(8), scl=machine.Pin(9), freq=400000)
i2c.scan()
Thanks
Code: Select all
import machine
i2c = machine.I2C(0, sda=machine.Pin(8), scl=machine.Pin(9))
i2c.scan()
Code: Select all
import machine
i2c=machine.I2C(0, sda=machine.Pin(8), scl=machine.Pin(9), freq=400000)
i2c.scan()
As stated here the internal pull ups are vrery weak, so you should add external resistors.scotty101 wrote: ↑Wed Jun 02, 2021 3:14 pmThe source code for the MicroPython port indicates that the internal pull up resistors configured when you use machine.I2C so external ones shouldn't be needed.
Code: Select all
>>> i2c = machine.I2C(0, sda=machine.Pin(8), scl=machine.Pin(9))
>>> i2c.scan()
[33]
>>> hex(33)
'0x21'
>>>