You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot find grove/grove_pwm_buzzer.py it in the current master branch. Only a pull request from some time back. #55
Am I doing something wrong or has the file been deleted for some reason?
The text was updated successfully, but these errors were encountered:
from __future__ importprint_functionimporttimefrommraaimportgetGpioLookupfromupmimportpyupm_buzzerasupmBuzzerdefmain():
print("Insert Grove-Buzzer to Grove-Base-Hat slot PWM[12 13 VCC GND]")
# Grove Base Hat for Raspberry Pi# PWM JST SLOT - PWM[12 13 VCC GND]pin=12## Create the buzzer object using RaspberryPi GPIO12mraa_pin=getGpioLookup("GPIO%d"%pin)
buzzer=upmBuzzer.Buzzer(mraa_pin)
chords= [upmBuzzer.BUZZER_DO,
upmBuzzer.BUZZER_RE,
upmBuzzer.BUZZER_MI,
upmBuzzer.BUZZER_FA,
upmBuzzer.BUZZER_SOL,
upmBuzzer.BUZZER_LA,
upmBuzzer.BUZZER_SI];
# Print sensor nameprint(buzzer.name())
# Play sound (DO, RE, MI, etc.), pausing for 0.1 seconds between notesforchord_indinrange (0,7):
# play each note for a half secondprint(buzzer.playSound(chords[chord_ind], 500000))
time.sleep(0.1)
print("exiting application")
# Delete the buzzer objectdelbuzzerif__name__=='__main__':
main()
But both the https://github.com/Seeed-Studio/grove.py/blob/master/setup.py script as well as various documentation (e.g. https://wiki.seeedstudio.com/Grove_Base_Hat_for_Raspberry_Pi/#usage) prominently mention
grove_pwm_buzzer
.I cannot find
grove/grove_pwm_buzzer.py
it in the current master branch. Only a pull request from some time back. #55Am I doing something wrong or has the file been deleted for some reason?
The text was updated successfully, but these errors were encountered: