I already had tested this buzzer module with my Arduino.
Testing buzzer direct connecting to power ( 3.3 V )
- module Pin - VCC
- Pin (middel) not connected
- module Pin S GND
Module gives sound, volume low !!
With ESP8266Basic program :
- Pin - ESP output pin
- Pin (middel) not connected
- Pin S ESP8266 Ground
Using the ESP8266Basic program below
[Pin Buzzer High] button switches my buzzer on.
[Pin Buzzer Low] button switches my buzzer off.
' TestKY012_Buzzer.bas
' 2016 J.Jeronimus
PinBuz = 5
html | <h1>Testing Active buzzer KY-012</h1> |
html | Connected to pin | & PinBuz & | <br><br> |
button "Set Pin Buzzer High", [SetPinBuzHigh]
html | <br><br> |
button "Set Pin Buzzer Low", [SetPinBuzLow]
html | <br><br> |
button " Exit", [Exit]
html | <br> |
wait
[SetPinBuzLow]
io(po,PinBuz,0)
wait
[SetPinBuzHigh]
io(po,PinBuz,1)
wait
end
Alternatively you can connect
- Pin - ESP VCC ( 3V3 )
- Pin (middel) not connected
- Pin S ESP8266 output pin 5
Using the same ESP8266Basic program
[Pin Buzzer High] button switches buzzer off.
[Pin Buzzer Low] button switches buzzer on.
No comments:
Post a Comment