Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adafruit_funhouse/peripherals.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def play_tone(frequency, duration):
It will attempt to play the sound up to 3 times in the case of
an error.
"""
if frequency <= 0:
raise ValueError("The frequency has to be greater than 0.")
if frequency < 0:
raise ValueError("Negative frequencies are not allowed.")
attempt = 0
# Try up to 3 times to play the sound
while attempt < 3:
Expand Down