File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,15 @@ Usage Example
38
38
39
39
.. code-block :: python
40
40
41
- # Import all board pins.
42
- from board import *
41
+ # Import all board pins and bus interface .
42
+ import board
43
43
import busio
44
44
45
45
# Import the HT16K33 LED matrix module.
46
46
from adafruit_ht16k33 import matrix
47
47
48
48
# Create the I2C interface.
49
- i2c = busio.I2C(SCL, SDA)
49
+ i2c = busio.I2C(board. SCL, board. SDA)
50
50
51
51
# Create the matrix class.
52
52
# This creates a 16x8 matrix:
@@ -62,11 +62,11 @@ Usage Example
62
62
matrix.fill(0)
63
63
64
64
# Set a pixel in the origin 0,0 position.
65
- matrix.pixel [0, 0] = 1
65
+ matrix[0, 0] = 1
66
66
# Set a pixel in the middle 8, 4 position.
67
- matrix.pixel [8, 4] = 1
67
+ matrix[8, 4] = 1
68
68
# Set a pixel in the opposite 15, 7 position.
69
- matrix.pixel [15, 7] = 1
69
+ matrix[15, 7] = 1
70
70
matrix.show()
71
71
72
72
# Change the brightness
You can’t perform that action at this time.
0 commit comments