Skip to content

Commit 084c61e

Browse files
committed
allow tone frequency of 0
1 parent a72f2e3 commit 084c61e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_magtag/peripherals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def play_tone(self, frequency, duration):
7676
It will attempt to play the sound up to 3 times in the case of
7777
an error.
7878
"""
79-
if frequency <= 0:
80-
raise ValueError("The frequency has to be greater than 0.")
79+
if frequency < 0:
80+
raise ValueError("Negative frequencies are not allowed.")
8181
self._speaker_enable.value = True
8282
attempt = 0
8383
# Try up to 3 times to play the sound

0 commit comments

Comments
 (0)