-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
As an experiment I have refactored PWMBuzzer and Speaker.
My aims were:
- to simplify PWMBuzzer
- have
PWMBuzzerstill act like a simpleBuzzer(e.g. you can turn it on and off using a button, but its frequency and volume can be set) - refactor Speaker so that rather than being a factory, it is a more complex
OutputDevicesimilar toRBGLED.
This code is in a seperate branch - https://github.com/RaspberryPiFoundation/picozero/tree/speaker
You can see the PR here - #28
This looks/feels like a simpler implementation, doesnt confuse PWMBuzzer and appears to support the same function set.
What do you think? If you are ok with it, I will pull it into dev.
There is some missing functionality from the original here - https://github.com/RaspberryPiFoundation/picozero/pull/28/files#diff-7d562e79b5dec9a5ca24810cfd4d70ff492c0dad33a569e1652693ee7ab79aabR651 - I wasnt sure what it was meant to do.
Metadata
Metadata
Assignees
Labels
No labels