Question: How do I make the buzzer to turn off? If I set the frequency and the last variable to 0 it turns off, but how

 How do I make the buzzer to turn off? If I

How do I make the buzzer to turn off? If I set the frequency and the last variable to 0 it turns off, but how do I set it such that it stays on for X seconds and then it turns off? Please be sure about your answer. Thanks

import pigpio import time import sys pi = pigpio.pi() PinNumber=13 FrequencyHz=100 # first arg is pin number, # second arg is frequency in Hz, # third arg is number of ON units out of 1000000 print ("The Output Frequency is:", FrequencyHz,) while True: pi.hardware_PWM (PinNumber, FrequencyHz, 500000) time. sleep (10) pi.hardware_PWM (PinNumber, 0, 0)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!