Skip to content

Commit ba55cb6

Browse files
committed
Fix licenses, simplify example.
1 parent 996759d commit ba55cb6

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2021 Kattni Rembor for Adafruit Industries
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Bartlebeats for Adafruit Industries
22
#
33
# SPDX-License-Identifier: CC-BY-SA-4.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2021 Kattni Rembor for Adafruit Industries
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Bartlebeats for Adafruit Industries
22
#
33
# SPDX-License-Identifier: CC-BY-SA-4.0

examples/macropad_mp3/macropad_mp3.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
macropad = MacroPad()
1313

1414
# To include more MP3 files, add the names to this list in the same manner as the others.
15-
# Then, add more key numbers below.
15+
# Then, press the key associated with the file's position in the list to play the file!
1616
audio_files = ["slow.mp3", "happy.mp3", "beats.mp3", "upbeats.mp3"]
1717

1818
while True:
@@ -23,8 +23,7 @@
2323
macropad.pixels[key_event.key_number] = colorwheel(
2424
int(255 / 12) * key_event.key_number
2525
)
26-
# If adding more MP3 files, add the appropriate key numbers to the tuple below.
27-
if key_event.key_number in (0, 1, 2, 3):
26+
if key_event.key_number < len(audio_files):
2827
macropad.play_file(audio_files[key_event.key_number])
2928

3029
else:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2021 Kattni Rembor for Adafruit Industries
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Bartlebeats for Adafruit Industries
22
#
33
# SPDX-License-Identifier: CC-BY-SA-4.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2021 Kattni Rembor for Adafruit Industries
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Bartlebeats for Adafruit Industries
22
#
33
# SPDX-License-Identifier: CC-BY-SA-4.0

0 commit comments

Comments
 (0)