Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The Buzzer shieldThe Hardware | ||||||||
Changed: | ||||||||
< < | The buzzer shield implements a passive buzzer with frequencies up to 1 kHz - 3 kHz. By default it uses data line D5 corresponding to GPIO 14 but can be configured to a different GPIO line. | |||||||
> > | The buzzer shield implements a passive buzzer with frequencies up to 1 kHz - 3 kHz. By default it uses data line D5 corresponding to GPIO 14 (GPIUO 18 on the ESP32) but can be configured to a different GPIO line. | |||||||
![]() | ||||||||
Line: 20 to 20 | ||||||||
And here are the scripts playing the ringtones: esp8266Buzzer is the main program relying on the RTTTL class defined in rtttl.py and the songs on RTTTL format defined in songs.py: | ||||||||
Changed: | ||||||||
< < | https://iotworkshop.africa/pub/AFNOG/BuzzerShield/esp8266Buzzer.py.txt | |||||||
> > | https://github.com/uraich/MicroPython_IoTDemos/blob/master/drivers/buzzer/espBuzzer.py![]() | |||||||
Changed: | ||||||||
< < | https://iotworkshop.africa/pub/AFNOG/BuzzerShield/rtttl.py.txt | |||||||
> > | https://github.com/uraich/MicroPython_IoTDemos/blob/master/drivers/buzzer/rtttl.py![]() | |||||||
Changed: | ||||||||
< < | https://iotworkshop.africa/pub/AFNOG/BuzzerShield/songs.py.txt | |||||||
> > | https://github.com/uraich/MicroPython_IoTDemos/blob/master/drivers/buzzer/songs.py![]() ![]() ![]() ![]() | |||||||
-- ![]() | ||||||||
Line: 37 to 55 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
The Buzzer shield | |||||||||
Added: | |||||||||
> > | The Hardware | ||||||||
Changed: | |||||||||
< < | The buzzer shield implements a passive buzzer with frequencies of 1 kHz - 3 kHz. By default it uses data line D5 corresponding to GPIO 14 but can be configured to a different GPIO line. | ||||||||
> > | The buzzer shield implements a passive buzzer with frequencies up to 1 kHz - 3 kHz. By default it uses data line D5 corresponding to GPIO 14 but can be configured to a different GPIO line. | ||||||||
![]() | |||||||||
Added: | |||||||||
> > | In order to make the device work a solder bridge for the data line must be installed ( see the 4 double solder blobs on the left hand side of the module. One of these pairs of blobs must be connected).
The softwareThe buzzer needs a frequency passed to it through a GPIO line (by default the upper solder pair blobs connected corresponding to D5 or GPIO 14. To test the device I wrote a very simple micro Python script sending a 500 Hz square wave to it. This can easily be done through the micro Python PWM class. Here is the code: https://iotworkshop.africa/pub/AFNOG/BuzzerShield/firstTest.py.txt Dave Hylands has written some micro Python buzzer scripts![]() | ||||||||
-- ![]() Comments | |||||||||
Line: 13 to 33 | |||||||||
| |||||||||
Added: | |||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
The Buzzer shieldThe buzzer shield implements a passive buzzer with frequencies of 1 kHz - 3 kHz. By default it uses data line D5 corresponding to GPIO 14 but can be configured to a different GPIO line.![]() ![]() Comments
|