8000 zephyr/README: Reorder content related to recently added I2C. · guidebee/micropython@b88bf42 · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit b88bf42

Browse files
pfalcondpgeorge
authored andcommitted
zephyr/README: Reorder content related to recently added I2C.
So it fits better with existing narrative.
1 parent c066dad commit b88bf42

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ports/zephyr/README.md

Lines changed: 8 additions & 8 deletions
< FBB7 /tr>
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Features supported at this time:
1212

1313
* REPL (interactive prompt) over Zephyr UART console.
1414
* `utime` module for time measurements and delays.
15-
* `machine.I2C` class for I2C control.
1615
* `machine.Pin` class for GPIO control.
16+
* `machine.I2C` class for I2C control.
1717
* `usocket` module for networking (IPv4/IPv6).
1818
* "Frozen modules" support to allow to bundle Python modules together
1919
with firmware. Including complete applications, including with
@@ -82,20 +82,20 @@ To blink an LED:
8282
LED.value(0)
8383
time.sleep(0.5)
8484

85-
To scan for I2C slaves:
86-
87-
from machine import I2C
88-
89-
i2c = I2C("I2C_0")
90-
i2c.scan()
91-
9285
The above code uses an LED location for a FRDM-K64F board (port B, pin 21;
9386
following Zephyr conventions port are identified by "GPIO_x", where *x*
9487
starts from 0). You will need to adjust it for another board (using board's
9588
reference materials). To execute the above sample, copy it to clipboard, in
9689
MicroPython REPL enter "paste mode" using Ctrl+E, paste clipboard, press
9790
Ctrl+D to finish paste mode and start execution.
9891

92+
Example of using I2C to scan for I2C slaves:
93+
94+
from machine import I2C
95+
96+
i2c = I2C("I2C_0")
97+
i2c.scan()
98+
9999

100100
Minimal build
101101
-------------

0 commit comments

Comments
 (0)
0