lower default volume limit, update examples, change warning message
This commit is contained in:
parent
f2325f3811
commit
c41e65bdeb
4 changed files with 5 additions and 5 deletions
|
|
@ -143,7 +143,7 @@ class Peripherals:
|
|||
See https://circuitpython.readthedocs.io/projects/neopixel/en/latest/api.html
|
||||
"""
|
||||
|
||||
def __init__(self, audio_output="headphone", safe_volume_limit=15):
|
||||
def __init__(self, audio_output="headphone", safe_volume_limit=12):
|
||||
self.neopixels = NeoPixel(board.NEOPIXEL, 5)
|
||||
|
||||
self._buttons = []
|
||||
|
|
@ -281,7 +281,7 @@ class Peripherals:
|
|||
f"Volume level must be less than or equal to "
|
||||
+ f"safe_volume_limit: {self.safe_volume_limit}. "
|
||||
+ f"Using higher values could damage speakers. "
|
||||
+ f"To override this limitation pass a value larger than 15 "
|
||||
+ f"To override this limitation pass a value larger {self.safe_volume_limit} "
|
||||
+ f"for the safe_volume_limit argument of the constructor."
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import adafruit_fruitjam
|
|||
pobj = adafruit_fruitjam.peripherals.Peripherals(audio_output="headphone")
|
||||
|
||||
FILES = ["beep.wav", "dip.wav", "rise.wav"]
|
||||
VOLUMES = [5, 7, 10, 12, 15]
|
||||
VOLUMES = [5, 7, 10, 11, 12]
|
||||
|
||||
while True:
|
||||
print("\n=== Headphones Test ===")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import adafruit_fruitjam
|
|||
pobj = adafruit_fruitjam.peripherals.Peripherals(audio_output="speaker")
|
||||
|
||||
FILES = ["beep.wav", "dip.wav", "rise.wav"]
|
||||
VOLUMES = [5, 7, 10, 12, 15]
|
||||
VOLUMES = [5, 7, 10, 11, 12]
|
||||
|
||||
while True:
|
||||
print("\n=== Speaker Test ===")
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ pobj = adafruit_fruitjam.peripherals.Peripherals(audio_output="headphone")
|
|||
|
||||
synth = synthio.Synthesizer(sample_rate=44100)
|
||||
pobj.audio.play(synth)
|
||||
VOLUMES = [5, 7, 10, 12, 15]
|
||||
VOLUMES = [5, 7, 10, 11, 12]
|
||||
C_major_scale = [60, 62, 64, 65, 67, 69, 71, 72, 71, 69, 67, 65, 64, 62, 60]
|
||||
while True:
|
||||
print("\n=== Synthio Test ===")
|
||||
|
|
|
|||
Loading…
Reference in a new issue