Pushbutton with Buzzer code required!

Hi, I would like to know the code if I push the ‘PUSHBUTTON’ simultaneously I’d like to hear the buzzer sound.
If pushbutton = 1, Buzzer = High
if pushbutton = 0, Buzzer = Low

PS: I have attached a code from my understanding.
Screenshot 2022-06-21 130059

I am not sure what you are asking here exactly. PUSHBUTTON means the button that appears on computer when you view the device from the BOLT platform correct? Or is PUSHBUTTON here an external device attached to the circuit?

Hi @finneyrockz99 ,
Apologies for the delayed response.
The code you wrote should work if you add the following


Also, there might be some latency because the code sleeps for 10 seconds.(time.sleep(10)) If you need higher bandwidth, check out BOLT cloud pro. Do check out the API Access Rules.