-
Notifications
You must be signed in to change notification settings - Fork 47
Description
There's an observation in Pimoroni Forums: Grow kit feedback
The piezo alarm is, in my opinion, very quiet. I will definitely not notice it chirping about dry soil from the other side of our busy kitchen.
I don't have an unboxed grow board to test this with but I suspect you are using a small piezo buzzer which performs at higher frequencyes (2-3 kHz) in terms of loudness but the code currently shows a liberal sprinkling of 440Hz. That's a useful referernce (A4) but may not be a good choice for producing a beep that's audible at a distance even with its square wave harmonics.
grow-python/examples/monitor.py
Line 786 in bc5fec5
| def __init__(self, image, enabled=True, interval=10.0, beep_frequency=440): |
And
grow-python/library/grow/__init__.py
Line 14 in bc5fec5
| self.pwm = GPIO.PWM(gpio_pin, 440) |
grow-python/library/grow/__init__.py
Line 45 in bc5fec5
| def beep(self, frequency=440, timeout=0.1, blocking=True, force=False): |
Those two could also be a single variable rather than two independent values.
I don't know if there's already use of different perodic beeping to indicate different emergency conditions but frequency could also be a part of this using the frequency to effectively increase volume, i.e. as it gets drier beep at 550, 1100, 2200Hz.