Does pyboard support soft I2C?

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
Posts: 159
Joined: Sun Apr 17, 2016 1:55 pm

Does pyboard support soft I2C?

Post by shaoziyang » Sat Jan 28, 2017 3:39 pm

Does pyboard may use any pin to implement soft I2C? Because hardware I2C pin can not use.

User avatar
Posts: 2565
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada

Re: Does pyboard support soft I2C?

Post by dhylands » Sat Jan 28, 2017 3:44 pm

Yes. If you construct the I2C by doing:

Code: Select all

i2c = machine.I2C(-1, sda=machine.Pin('X1'), scl=machine.Pin('X2'))

Post Reply