Skip to content

Commit 15b748f

Browse files
authored
Merge pull request #16 from kattni/slideshow-example
Add slideshow example.
2 parents a595621 + 1c0dcd1 commit 15b748f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

examples/clue_slideshow.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""Display a series of bitmaps using the buttons to advance through the list. To use: place
2+
supported bitmap files on your CIRCUITPY drive, then press the buttons on your CLUE to advance
3+
through them.
4+
5+
Requires the Adafruit CircuitPython Slideshow library!"""
6+
7+
from adafruit_clue import clue
8+
from adafruit_slideshow import SlideShow, PlayBackDirection
9+
10+
slideshow = SlideShow(clue.display, None, folder="/", auto_advance=False, dwell=0)
11+
12+
while True:
13+
if clue.button_b:
14+
slideshow.direction = PlayBackDirection.FORWARD
15+
slideshow.advance()
16+
if clue.button_a:
17+
slideshow.direction = PlayBackDirection.BACKWARD
18+
slideshow.advance()

0 commit comments

Comments
 (0)