This page (revision-15) was last changed on 2021-05-07 09:36 by Murray Altheim

This page was created on 2021-03-08 04:23 by Murray Altheim

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
15 2021-05-07 09:36 7 KB Murray Altheim to previous
14 2021-05-07 09:31 7 KB Murray Altheim to previous | to last
13 2021-03-09 09:47 7 KB Murray Altheim to previous | to last
12 2021-03-09 09:33 7 KB Murray Altheim to previous | to last
11 2021-03-09 09:33 7 KB Murray Altheim to previous | to last
10 2021-03-09 09:26 6 KB Murray Altheim to previous | to last
9 2021-03-09 09:22 6 KB Murray Altheim to previous | to last
8 2021-03-09 09:15 5 KB Murray Altheim to previous | to last
7 2021-03-08 05:22 5 KB Murray Altheim to previous | to last
6 2021-03-08 05:04 4 KB Murray Altheim to previous | to last
5 2021-03-08 04:47 4 KB Murray Altheim to previous | to last
4 2021-03-08 04:44 4 KB Murray Altheim to previous | to last
3 2021-03-08 04:37 2 KB Murray Altheim to previous | to last
2 2021-03-08 04:35 2 KB Murray Altheim to previous | to last
1 2021-03-08 04:23 1 KB Murray Altheim to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 62 added one line
! Example Code
At line 64 added 16 lines
This sets the SCL and SDA pins for I2C Controller 0 to pin 9 and 8 (resp.), then reads and writes from the address 0x76.
{{{
from machine import Pin, I2C
i2c = I2C(0, scl=Pin(9), sda=Pin(8), freq=100000)
i2c.scan()
i2c.writeto(76, b'123')
i2c.readfrom(76, 4)
i2c = I2C(1, scl=Pin(7), sda=Pin(6), freq=100000)
i2c.scan()
i2c.writeto_mem(76, 6, b'456')
i2c.readfrom_mem(76, 6, 4)
}}}