-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tone generation example using PWM and piezo buzzer or a speaker #444
base: develop
Are you sure you want to change the base?
Conversation
What piezo are you using? The only one I had sounds terrible! |
It is basically a passive buzzer (which does not make any sound when you directly give power). |
As this now depends on raspberrypi/pico-extras#70 I believe this PR ought to be closed and a similar one re-opened on the https://github.com/raspberrypi/pico-playground repo @jcarranz97 EDIT: Converted this PR to draft to stop it being accidentally merged. |
NOTE - This PR depends on raspberrypi/pico-sdk#1569 as it uses
pico\tone.h
library.This example demonstrates how to use the tone library to generate tones using a piezo buzzer or a speaker.
The
tone()
function is similar totone()
from Arduino.In this example, the Raspberry Pi Pico performs "Silent Night" melody to demonstrate how to reproduce tones that become melodies 馃幎 (I am using this to put some music on my Christmas Tree 馃巹 馃巺馃徔 ).
Thanks!