Skip to content

Commit

Permalink
Colour cycling example
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Nov 5, 2020
1 parent e46ee61 commit 9edf29d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/7color/cycle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python3
import time

from inky.inky_uc8159 import Inky


inky = Inky()

colors = ['Black', 'White', 'Green', 'Blue', 'Red', 'Yellow', 'Orange']

for color in range(7):
print("Color: {}".format(colors[color]))
for y in range(inky.height - 1):
for x in range(inky.width - 1):
inky.set_pixel(x, y, color)
inky.show()
time.sleep(5.0)

0 comments on commit 9edf29d

Please sign in to comment.