File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ Currently there is only one such class: ``I2CPCF8574Interface``.
20
20
21
21
.. code-block :: python
22
22
23
+ import board
24
+
23
25
from lcd.lcd import LCD
24
26
from lcd.i2c_pcf8574_interface import I2CPCF8574Interface
25
27
@@ -28,7 +30,7 @@ Currently there is only one such class: ``I2CPCF8574Interface``.
28
30
# Talk to the LCD at I2C address 0x27.
29
31
# The number of rows and columns defaults to 4x20, so those
30
32
# arguments could be omitted in this case.
31
- lcd = LCD(I2CPCF8574Interface(0x 27 ), num_rows = 4 , num_cols = 20 )
33
+ lcd = LCD(I2CPCF8574Interface(board.I2C(), 0x 27 ), num_rows = 4 , num_cols = 20 )
32
34
33
35
lcd.print(" abc " )
34
36
lcd.print(" This is quite long and will wrap onto the next line automatically." )
You can’t perform that action at this time.
0 commit comments