Include pico_tone library #1569

Closed
jcarranz97 wants to merge 3 commits from add-pico-tone into develop
jcarranz97 commented 2023-12-03 14:58:20 -06:00 (Migrated from github.com)

Fixes #1568

This PR includes tone functions to generate tones using PWM.

The tone function is similar to tone() from Arduino. I have also included a no_tone function to silence buzzer if needed.

I have a PR open in pico-examples repository which includes an example usage for this library.

Inspiration and References:

Fixes #1568 This PR includes tone functions to generate tones using PWM. The tone function is similar to [tone()](https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/) from Arduino. I have also included a `no_tone` function to silence buzzer if needed. I have a PR open in [pico-examples](https://github.com/raspberrypi/pico-examples) repository which includes an example usage for this library. - https://github.com/raspberrypi/pico-examples/pull/444 ## Inspiration and References: - [[_docs.arduino.cc_] - Play a Melody using the tone() function](https://docs.arduino.cc/built-in-examples/digital/toneMelody) - [[_www.hackster.io_] - PWM Sound Synthesis](https://www.hackster.io/106958/pwm-sound-synthesis-9596f0#:~:text=A%20PWM%20signal%20with%20a,ear%20and%20brain%20interpret%20it.) - [[_peppe8o.com_] - Passive Buzzer with Raspberry PI Pico and MicroPython](https://peppe8o.com/passive-buzzer-with-raspberry-pi-pico-and-micropython/)
lurch commented 2023-12-03 17:51:55 -06:00 (Migrated from github.com)

This might be better suited to https://github.com/raspberrypi/pico-extras than it is to pico-sdk ?

This might be better suited to https://github.com/raspberrypi/pico-extras than it is to pico-sdk ?
jcarranz97 commented 2023-12-03 18:02:00 -06:00 (Migrated from github.com)

That is probably the best approach ...

Is the normal process first propose new libraries and examples against pico-extrasand pico-playground?
If that is case, I can go ahead an move my PRs to those repos 👀

That is probably the best approach ... Is the normal process first propose new libraries and examples against [pico-extras](https://github.com/raspberrypi/pico-extras)and [pico-playground](https://github.com/raspberrypi/pico-playground)? If that is case, I can go ahead an move my PRs to those repos :eyes:
lurch commented 2023-12-03 18:13:53 -06:00 (Migrated from github.com)

I believe the way it normally works is that if your example works out-of-the-box with the develop version of pico-sdk then you'd just submit it against pico-examples; but if your example relies on pico-extras then you'd submit it against pico-playground.

So in answer to your question: yes 😃

I believe the way it normally works is that if your example works out-of-the-box with the `develop` version of `pico-sdk` then you'd just submit it against `pico-examples`; but if your example relies on `pico-extras` then you'd submit it against `pico-playground`. So in answer to your question: yes :smiley:
jcarranz97 commented 2023-12-03 19:54:40 -06:00 (Migrated from github.com)

Thanks for the advice, I have just opened a PR against pico-extras to include this library there 💪
https://github.com/raspberrypi/pico-extras/pull/70

Thanks for the advice, I have just opened a PR against `pico-extras` to include this library there :muscle: https://github.com/raspberrypi/pico-extras/pull/70
peterharperuk commented 2024-05-21 04:22:15 -05:00 (Migrated from github.com)

Not an sdk issue

Not an sdk issue

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!1569
No description provided.