trigger pi pico buzzer remotely #10678
Unanswered
siennamediatest
asked this question in
RP2040 / Pico
Replies: 1 comment 6 replies
-
As a first step just play a tone using PWM. You're already using from machine import Pin, PWM
pwmpin = Pin(16, Pin.OUT)
pwm = PWM(pwmpin)
async def beep(): # Use asyncio.create_task(beep()) to run this
pwm.init(freq=440, duty_u16=32768)
await asyncio.sleep(1)
pwm.deinit() |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I work in a retirement home and have built a 'dementia proof' media centre for residents. I've also built an IR remote using pi pico w, which only has 2 buttons and it much simpler for them to use. The remote has an onboard buzzer, and I want to be able to trigger the buzzer from a gpio button on the media centre to make the remote easier to locate. I have done a few web server tests to remotely turn on an led, but I'm having difficulty modifying the approach to work with the buzzer. Ideally I would want to remotely run a micropython code that I wrote so that the buzzer plays music.
Beta Was this translation helpful? Give feedback.
All reactions