docs/wipy/quickref: Update reference for change to I2C API.

pull/3011/head
Damien George 2017-04-18 13:20:07 +10:00
rodzic 8f205c2c9b
commit 27f0862550
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -112,7 +112,7 @@ See :ref:`machine.I2C <machine.I2C>`. ::
from machine import I2C
# configure the I2C bus
i2c = I2C(0, I2C.MASTER, baudrate=100000)
i2c = I2C(baudrate=100000)
i2c.scan() # returns list of slave addresses
i2c.writeto(0x42, 'hello') # send 5 bytes to slave with address 0x42
i2c.readfrom(0x42, 5) # receive 5 bytes from slave