Ks0103 keyestudio EASY plug Passive Buzzer Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 28: Line 28:


==Sample Code==
==Sample Code==
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload.  
Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<pre>
<br>[[File:ks0398 5.1.png|600px|frameless|thumb]]<br>
int buzzer=8;//set digital IO pin of the buzzer
 
void setup()
{
pinMode(buzzer,OUTPUT);// set digital IO pin pattern, OUTPUT to be output
}
void loop()
{ unsigned char i,j;//define variable
while(1)
{ for(i=0;i<80;i++)// output a frequency sound
{ digitalWrite(buzzer,HIGH);// sound
delay(1);//delay1ms
digitalWrite(buzzer,LOW);//not sound
delay(1);//ms delay
}
for(i=0;i<100;i++)// output a frequency sound
{
digitalWrite(buzzer,HIGH);// sound
digitalWrite(buzzer,LOW);//not sound
delay(2);//2ms delay
}
}
}
</pre>


<br>
<br>
==What You Should See==
==What You Should See==
<br>[[File:ks0398 5-1.png|600px|frameless|thumb]]<br>
Done uploading the code, you should be able to hear the buzzer module make a small “click”.
Done uploading the code, you should be able to hear the buzzer module make a small “click”.
<br>[[File:Ks0103-3.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0103-3.png|600px|frameless|thumb]]<br>


<br>
<br>
==Resources ==
==Resources ==


'''Download the PDF:'''<br>
'''Download the Arduino Code and PDF:'''<br>
https://drive.google.com/open?id=1pQj561dWpMkzIBY1siyFwDCJgOCjXUPi
https://drive.google.com/open?id=1dRNYJVTc9-fcKRiZ0LhDj8fHtFrzTWKK


'''Download the Code:'''<br>
'''Download the Mixly Code:'''<br>
https://drive.google.com/open?id=1PBnazbkjn06xvLcIw2G4GqYJiH5W4Xsf
https://drive.google.com/open?id=1kUOzMKBdaPzlNWQiciTNpnWWxkDVOJ8g




<br>
<br>
==Buy from ==
==Buy from ==
*'''Official Website:''' http://www.keyestudio.com/ks0103.html
*[https://www.keyestudio.com/keyestudio-easy-plug-passive-buzzer-module-for-arduino-steam-p0078-p0078.html '''Official Website''' ]


*[https://www.aliexpress.com/store/product/2016NEW-Keyestudio-EASY-plug-Passive-Buzzer-Module-for-Arduino/1452162_32637357831.html?spm=2114.12010612.8148356.11.43b8484e8Kd7LP  Shop on aliexpress ]
*[https://www.aliexpress.com/store/product/2016NEW-Keyestudio-EASY-plug-Passive-Buzzer-Module-for-Arduino/1452162_32637357831.html?spm=2114.12010612.8148356.11.43b8484e8Kd7LP  Shop on aliexpress ]

Revision as of 11:24, 6 May 2019

EASY plug Passive Buzzer Module


Introduction

We can use Arduino to make many interactive works of which the most commonly used is acoustic-optic display.
The buzzer we introduced here is a passive buzzer. It cannot be actuated by itself, but by external pulse frequencies.
Different frequencies produce different sounds. You can use Arduino to code the melody of a song, which is quite fun and simple.

Note: this module should be used together with EASY plug control board.


Specification

  • Interface: Easy plug
  • Working voltage: 3.3-5V
  • Sensor type: digital
  • Easy to use


Technical Details

  • Dimensions: 39mm*20mm*18mm
  • Weight: 5.6g


Connect It Up

Connect the EASY Plug passive buzzer module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb

Sample Code

Open or drag below code to Mixly Blocks and upload.

thumb



What You Should See


thumb
Done uploading the code, you should be able to hear the buzzer module make a small “click”.
thumb


Resources

Download the Arduino Code and PDF:
https://drive.google.com/open?id=1dRNYJVTc9-fcKRiZ0LhDj8fHtFrzTWKK

Download the Mixly Code:
https://drive.google.com/open?id=1kUOzMKBdaPzlNWQiciTNpnWWxkDVOJ8g



Buy from