We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b961bce commit 623195aCopy full SHA for 623195a
adafruit_funhouse/peripherals.py
@@ -96,8 +96,8 @@ def play_tone(frequency, duration):
96
It will attempt to play the sound up to 3 times in the case of
97
an error.
98
"""
99
- if frequency <= 0:
100
- raise ValueError("The frequency has to be greater than 0.")
+ if frequency < 0:
+ raise ValueError("Negative frequencies are not allowed.")
101
attempt = 0
102
# Try up to 3 times to play the sound
103
while attempt < 3:
0 commit comments