Skip to content

Commit 8b7178b

Browse files
author
mprice
committed
Added ColorEightByEight class and example program for Adafruit Bicolor LED Square Pixel Matrix with I2C Backpack
Added note about possible pixel indexing bug in the non-color version. I don't have the non-color version to test with. Added note about possible unintentional color "blending" bug in the Arduino color version.
1 parent 6a8ed9c commit 8b7178b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/python
2+
3+
import time
4+
import datetime
5+
from Adafruit_8x8 import ColorEightByEight
6+
7+
# ===========================================================================
8+
# 8x8 Pixel Example
9+
# ===========================================================================
10+
grid = ColorEightByEight(address=0x70)
11+
12+
print "Press CTRL+Z to exit"
13+
14+
iter = 0
15+
16+
# Continually update the 8x8 display one pixel at a time
17+
while(True):
18+
iter += 1
19+
20+
print (iter % 4)
21+
22+
for x in range(0, 8):
23+
for y in range(0, 8):
24+
grid.setPixel(x, y, iter%4 )
25+
time.sleep(0.02)
26+
27+
# I think there is another bug here that drawing red or green after yellow doesn't clear the other component until you draw a blank
28+
29+
# time.sleep(0.5)
30+
# grid.clear()
31+
# time.sleep(0.5)

0 commit comments

Comments
 (0)