# Import Library
from machine import Pin, PWM
import time

# Setup Variable
frequency = 1000
duty_cycle = 700
beep_length = 3 #Second 

# Setup Pin
Buzzer_Pin = Pin(32,Pin.OUT)

# Play Buzzer with frequency and duty cycle
beeper = PWM(Buzzer_Pin, freq=frequency, duty=duty_cycle)

# Delay (length of the beep)
time.sleep(beep_length)

# Turn off buzzer
beeper.deinit()