I tried to make sound with a buzzer with 3 PINS. The code is as below. When I ran it it doesnt sound but... I hear like a click every second. Why I cant hear any sound?
Code: Select all
[ import RPi.GPIO as GPIO import time buzzPin =11 GPIO.setmode(GPIO.BCM) try: GPIO.setup(buzzPin, GPIO.OUT) while True: time.sleep(1) GPIO.output(buzzPin, GPIO.LOW) time.sleep(1) GPIO.output(buzzPin, GPIO.HIGH) except: GPIO.cleanup()/code]