|
11 | 11 | import time
|
12 | 12 | import board
|
13 | 13 | import displayio
|
| 14 | +import adafruit_touchscreen |
| 15 | +from adafruit_bitmap_font import bitmap_font |
14 | 16 | from adafruit_displayio_layout.widgets.flip_input import FlipInput
|
15 | 17 |
|
16 |
| -from adafruit_bitmap_font import bitmap_font |
17 |
| -import adafruit_touchscreen |
18 | 18 |
|
19 | 19 | display = board.DISPLAY # create the display on the PyPortal,
|
20 | 20 | # otherwise change this to setup the display
|
|
92 | 92 | arrow_height=30,
|
93 | 93 | arrow_width=20,
|
94 | 94 | horizontal=True,
|
95 |
| - animation_time=0.6, # add more time since the animation covers a longer distance |
| 95 | + animation_time=0.6, # add more time since the animation covers a longer distance |
96 | 96 | )
|
97 | 97 |
|
98 | 98 | # Pick an interesting date to start
|
99 | 99 | # You can set the value by direct integer indexes of the list or by one of the strings
|
100 | 100 | # Here are three ways to set the values
|
101 |
| -my_flip1.value = 9 # use direct integer indexing to set the value to the 10th month |
102 |
| -my_flip2.value = my_flip2.value_list.index("21") # find the index yourself by |
103 |
| - # searching the value_list |
104 |
| -my_flip3.value = "2015" # or set the value based on a string that is in the value_list |
| 101 | +my_flip1.value = 9 # use direct integer indexing to set the value to the 10th month |
| 102 | +my_flip2.value = my_flip2.value_list.index("21") # find the index yourself by |
| 103 | +# searching the value_list |
| 104 | +my_flip3.value = "2015" # or set the value based on a string that is in the value_list |
105 | 105 |
|
106 | 106 | # Create the group to display and append the FlipInput widgets
|
107 | 107 | my_group = displayio.Group(max_size=3)
|
|
0 commit comments