ข้อมูล
น้ำหนัก
บาร์โค้ด
ลงสินค้า
อัพเดทล่าสุด
รายละเอียดสินค้า
passive buzzer module KY-006
 
โมดูล Passive Buzzer ใช้ไฟเลี้ยง 3.3 - 5V สามารถสร้างเสียงคนตรีได้
(เหมาะทำเสียงกันขโมย)
 
 
Description:
 
Pressure of work: 3.3-5V
holes for easy installation bolts fixed
size PCB: 3.3 x 1.3 cm
DuPont line length, 21 cm
modules are used. drive transistor 9012
 
characteristics:
 
no Origin vibrations require energy (frequency 2K-5K) to drive the
control frequency, you can "do, re, mi fa sol la si" the
 
definition of Pinter:
/*
VCC:. 5V-3.3V
GND,: ground
I /O :13
Test Ubo-r3

Code 1:เสียงเพลง
*/
int speakerPin = 13;
 
int length = 15; // the number of notes
char notes[] = "ccggaagffeeddc "; // a space represents a rest
int beats[] = { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 4 };
int tempo = 300;
 
void playTone(int tone, int duration) {
  for (long i = 0; i < duration * 1000L; i += tone * 2) {
    digitalWrite(speakerPin, LOW);
    delayMicroseconds(tone);
    digitalWrite(speakerPin, HIGH);
    delayMicroseconds(tone);
  }
}
 
void playNote(char note, int duration) {
  char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };
  int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };
 
  // play the tone corresponding to the note name
  for (int i = 0; i < 8; i++) {
    if (names[i] == note) {
      playTone(tones[i], duration);
    }
  }
}

Code 2:การแจ้งเตือน

const int buzzer = 13; //buzzer to arduino pin 13
void setup(){
   pinMode(buzzer, OUTPUT); // Set buzzer - pin 13 as an output
}
 
void loop(){
 
  tone(buzzer, 600); // Send 600Hz sound signal...
  delay(500);        // ...for 1/2 sec
  noTone(buzzer);     // Stop sound...
  delay(500);        // ...for 1/2 sec
  
}
 
เงื่อนไขอื่นๆ
Tags

วิธีการชำระเงิน

บมจ. ธนาคารกรุงไทย สาขาโรงไฟฟ้าบางปะกง ออมทรัพย์
ธนาคารกรุงเทพ จำกัด (มหาชน) สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
บมจ. ธนาคารกรุงไทย สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
พร้อมเพย์ สาขา- -
Scan this!
สนธยา ใจผ่อง
063-xxxxxx-8
Accept All Banks | รับเงินได้จากทุกธนาคาร
พูดคุย-สอบถาม