Skip to content

Commit 3b585aa

Browse files
Code tweaks, add BMPs
1 parent da1aca0 commit 3b585aa

8 files changed

Lines changed: 5 additions & 2 deletions

File tree

2.75 KB
Binary file not shown.
5.33 KB
Binary file not shown.
4.98 KB
Binary file not shown.
15.2 KB
Binary file not shown.
25.4 KB
Binary file not shown.
27.6 KB
Binary file not shown.

CLUE_Light_Painter/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# These are permanent global settings, can only change by editing the code:
2626

2727
FLIP_SCREEN = True # If True, turn CLUE screen & buttons upside-down
28-
PATH = '/bmps' # Folder containing BMP images (or '' for root path)
28+
PATH = '/bmps-30px' # Folder containing BMP images (or '' for root path)
2929
GAMMA = 2.6 # Correction factor for perceptually linear brightness
3030
NUM_PIXELS = 30 # LED strip length, half-meter is usu. 30 or 72 pixels
3131
PIXEL_PIN = board.D0 # Output pin for NeoPixel data

CLUE_Light_Painter/ubmp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,11 @@ def scandir(self, path):
128128
BMP formats (e.g. compressed or paletted) are skipped.
129129
List will be alphabetically sorted.
130130
"""
131-
full_list = listdir(path)
132131
valid_list = []
132+
try:
133+
full_list = listdir(path)
134+
except OSError:
135+
return
133136
for entry in full_list:
134137
try:
135138
with open(path + '/' + entry, "rb") as self.file:

0 commit comments

Comments
 (0)