Pi Pico - Buzzer
1 2 3 4 5 6 7 8 9 10 11 12 13 | from machine import Pin import utime internal_led = machine.Pin(25, machine.Pin.OUT) buzzer = machine.Pin(12, machine.Pin.OUT) for i in range(10): buzzer.value(1) internal_led.value(1) utime.sleep(0.25) buzzer.value(0) internal_led.value(0) utime.sleep(0.2) |