Answered step by step
Verified Expert Solution
Question
1 Approved Answer
When the code runs a buzzer turns on indefinitely. I want the buzzer to play for x seconds what lines of code do I need
When the code runs a buzzer turns on indefinitely. I want the buzzer to play for x seconds what lines of code do I need to add?
import pigpio import time import sys pi = pigpio.pi() PinNumber=13 FrequencyHz=5 # 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)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started