|
5 | 5 |
|
6 | 6 | Code by Erin St Blaine for Adafruit Industries |
7 | 7 | """ |
8 | | -<<<<<<< HEAD |
9 | 8 | import time |
10 | | -======= |
11 | | - |
12 | | ->>>>>>> origin/master |
13 | 9 | import board |
14 | 10 | import neopixel |
15 | 11 | from adafruit_clue import clue |
|
54 | 50 | counter = 0 |
55 | 51 | toggle = 1 # for on/off switch on button A |
56 | 52 | displayOn = 1 # to turn the display on and off with button B |
57 | | -<<<<<<< HEAD |
58 | 53 | button_b_pressed = False |
59 | 54 | button_a_pressed = False |
60 | | -======= |
61 | | ->>>>>>> origin/master |
62 | 55 |
|
63 | 56 | clue.display.brightness = 0.8 |
64 | 57 | clue_display = displayio.Group(max_size=4) |
|
109 | 102 | icePalette = [0x8080FF, 0x8080FF, 0x8080FF, 0x0000FF, 0xC88AFF] |
110 | 103 | sunPalette = [0xffaa00, 0xffdd00, 0x7d5b06, 0xfffca8] |
111 | 104 | firePalette = [0xff0000, 0xff5500, 0x8a3104, 0xffaa00 ] |
112 | | -<<<<<<< HEAD |
113 | 105 | forestPalette = [0x76DB00, 0x69f505, 0x05f551, 0x3B6D00] |
114 | | -======= |
115 | | -forestPalette = [0xccffa8, 0x69f505, 0x05f551, 0x2c8247] |
116 | | ->>>>>>> origin/master |
117 | 106 |
|
118 | 107 | # set up default initial palettes, just for startup |
119 | 108 | palette = forestPalette |
|
139 | 128 | toggle = 1 |
140 | 129 | pixels.brightness = 1.0 |
141 | 130 | clue.display.brightness = 0.8 |
142 | | -<<<<<<< HEAD |
143 | 131 | button_a_pressed = True # Set to True. |
144 | 132 | time.sleep(0.03) # Debounce. |
145 | 133 | if not clue.button_a and button_a_pressed: # On button release... |
|
148 | 136 | if clue.button_b and not button_b_pressed: # If button B pressed... |
149 | 137 | print("Button B pressed.") |
150 | 138 | # Toggle only the display on and off |
151 | | -======= |
152 | | - if clue.button_b: |
153 | | - # Toggle only the display on and off |
154 | | ->>>>>>> origin/master |
155 | 139 | if displayOn == 0: |
156 | 140 | clue.display.brightness = 0.8 |
157 | 141 | displayOn = 1 |
|
256 | 240 | reading3_label.y = 194 |
257 | 241 | timer_label.y = 224 |
258 | 242 | # if reading is falling, show sinking image and position text at the top |
259 | | -<<<<<<< HEAD |
260 | 243 | elif reading1 < reading2: #reading is falling |
261 | | -======= |
262 | | - elif reading2 < reading3: #reading is falling |
263 | | ->>>>>>> origin/master |
264 | 244 | sinking_sprite.x = 0 |
265 | 245 | reading_label.y = 24 |
266 | 246 | reading2_label.y = 54 |
|
0 commit comments