picoco/buzzer/README.md
2025-03-05 10:43:11 +01:00

39 lines
919 B
Markdown

# buzzer
A program to run alarm on button pushed.
To activate the alarm, push the button. Same for desactivation.
The alarm is launched in a separate task and controlled by
the main task (which holds the push button logic).
You can run the application in "DEBUG" mode using:
`make run-debug name=buzzer`
The FreeRTOS engine is replaced by threads.
## Hardware
### Variant 1
* 1x Passive Buzzer
* 1x Push button
* 1 NPN transistor for signal amplification
* 1x 1k ohm resistor (NPN collector)
* 2x 10k ohm resistor
<div align="center">
<img src="circuit.jpg" style="transform:rotate(-90deg); margin:-100px;" width="300" />
</div>
### Variant 2
You can play with the frequency [1500; 2000] hz thanks to the potentiometer.
* Variant 1
* 1x Rotary potentiometer
* 1x blue LED
<div align="center">
<img src="circuit_variant.jpg" style="transform:rotate(-90deg); margin:-90px;" width="300" />
</div>
Enjoy ! 😉