We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5c6d563 + 291edae commit 491d0eeCopy full SHA for 491d0ee
adafruit_magtag/peripherals.py
@@ -73,6 +73,8 @@ def play_tone(self, frequency, duration):
73
It will attempt to play the sound up to 3 times in the case of
74
an error.
75
"""
76
+ if frequency <= 0:
77
+ raise ValueError("The frequency has to be greater than 0.")
78
self._speaker_enable.value = True
79
attempt = 0
80
# Try up to 3 times to play the sound
0 commit comments