Skip to content

Commit 194fe9a

Browse files
committed
Improve 3rd party board example
1 parent e90f2a1 commit 194fe9a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/third_party_board.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@
1010
"""
1111

1212
from modulino import Modulino
13+
from modulino import ModulinoPixels
1314
from machine import I2C, Pin
1415

1516
# The modulinos use a frequency of 100kHz by default.
1617
bus = I2C(0, freq=100000)
1718
# bus = I2C(0, scl=Pin(18), sda=Pin(19), freq=100000) # If you need to specify the pins
1819

19-
# In case the board was reset in the mean time some modulinos might
20-
# be stuck in a pending operation. To get them unstuck we need to reset the bus.
20+
# In case the board was reset during a previous operation the modulinos might
21+
# end up with a stuck bus. To get them unstuck we need to reset the bus.
2122
bus = Modulino.reset_bus(bus)
2223

2324
# Do something with your modulino...
25+
# For example controlling the pixels:
26+
pixels = ModulinoPixels(bus)
27+
pixels.set_all_rgb(0, 255, 0, 100)
28+
pixels.show()

0 commit comments

Comments
 (0)