Page 1 of 1

I2C with new hardware API on CC3200 port

Posted: Sun Jun 18, 2017 11:23 am
by danielm
How to init (hardware) I2C interface via new hardware API on CC3200 port?

Re: I2C with new hardware API on CC3200 port

Posted: Sun Jun 18, 2017 5:08 pm
by danielm
This code worked for me:

Code: Select all

i2c_scl = machine.Pin("GP12", mode=machine.Pin.ALT, alt = 5)
i2c_sda = machine.Pin("GP13", mode=machine.Pin.ALT, alt = 5)
i2c = machine.I2C(scl=i2c_scl, sda=i2c_sda, freq=100000)