File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ from adafruit_slideshow import PlayBackMode , SlideShow , PlayBackDirection
2
+ import touchio
3
+ import board
4
+
5
+ forward_button = touchio .TouchIn (board .TOUCH4 )
6
+ back_button = touchio .TouchIn (board .TOUCH1 )
7
+
8
+ brightness_up = touchio .TouchIn (board .TOUCH3 )
9
+ brightness_down = touchio .TouchIn (board .TOUCH2 )
10
+
11
+ slideshow = SlideShow ()
12
+ slideshow .order = PlayBackMode .ALPHA
13
+ slideshow .auto_advance = False
14
+ slideshow .dwell = 0
15
+
16
+ while True :
17
+ if forward_button .value :
18
+ slideshow .advance ()
19
+ if back_button .value :
20
+ slideshow .advance (direction = PlayBackDirection .BACKWARD )
21
+
22
+ if brightness_up .value :
23
+ slideshow .backlight_level_up ()
24
+ elif brightness_down .value :
25
+ slideshow .backlight_level_down ()
26
+ slideshow .update ()
You can’t perform that action at this time.
0 commit comments