Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Commit a2daeea

Browse files
committed
Create ex_16x8_pixels.py
Example script using the 16x8 backpack.
1 parent 0b56d57 commit a2daeea

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/python
2+
3+
import time
4+
import datetime
5+
from Adafruit_16x8 import SixteenByEight
6+
7+
# ===========================================================================
8+
# 16x8 Pixel Example
9+
# ===========================================================================
10+
grid = SixteenByEight(address=0x70)
11+
12+
print "Press CTRL+Z to exit"
13+
14+
# Continually update the 16x8 display one pixel at a time
15+
while(True):
16+
for x in range(0, 8):
17+
for y in range(0, 16):
18+
grid.setPixel(x, y)
19+
time.sleep(0.05)
20+
time.sleep(0.5)
21+
grid.clear()
22+
time.sleep(0.5)

0 commit comments

Comments
 (0)