Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

Discuss the key ambient conditions and their effects on customers.

Answered: 1 week ago

Question

Be familiar with the integrative servicescape model.

Answered: 1 week ago

Question

Understand the role of corporate design in communications.

Answered: 1 week ago