Ardumotive Arduino Greek Playground
  • Home
    • About us
    • Contact
    • License
  • Arduino
    • Tutorials
    • Workshop
  • Raspberry Pi
  • DIY 3D Printer
  • News
    • Events >
      • Unboxing & Review
    • Blog
The 1st Arduino Playground in Greece - Open Source Hardware
Available Languages
Picture
Picture

Εισαγωγή

Picture
Αυτό το Passive Buzzer Module είναι παθητικό επειδή δεν διαθέτει κανένα σύστημα ώστε να παράγει ήχο ή ηχό απο μόνο του. Είναι απαραίτητο για το Buzzer ένας μικροελεγκτής, όπως ένα Arduino για να παράγει ήχο. Επειδή η συσκευή είναι παθητική, λειτουργεί περισσότερο σαν ένα μικρό ηχείο παρά ένα βομβητή.

Τα υλικά που θα χρειαστούμε

Για το tutorial αυτό θα χρειαστούμε:
  • Arduino uno
  • Breadboard
  • Passive buzzer module
Picture

Το κύκλωμα

Picture
Οι συνδέσεις είναι αρκετά εύκολες, δείτε την παραπάνω εικόνα με το σχηματικό του κυκλώματος σε breadboard.

Ο κώδικας

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Arduino tutorial - Passive Buzzer Module 
   More info and circuit: http://www.ardumotive.com
   Dev: Giannis Vasilakis // Date: 12/11/2017  */
   
int buzzer = 8 ;
void setup ()
{
  pinMode (buzzer, OUTPUT) ;
}
void loop ()
{
  unsigned char i, j ;
  while (1)
  {
    for (i = 0; i <80; i++) // When a frequency sound
    {
      digitalWrite (buzzer, HIGH) ; //send tone
      delay (1) ;
      digitalWrite (buzzer, LOW) ; //no tone
      delay (1) ;
    }
    for (i = 0; i <100; i++) 
    {
      digitalWrite (buzzer, HIGH) ;
      delay (2) ;
      digitalWrite (buzzer, LOW) ;
      delay (2) ;
    }
  }
}
Κατεβάστε τον κώδικα απ' εδώ και ανοίξτε το αρχείο με το Arduino IDE.
passive_buzzer.zip
File Size: 0 kb
File Type: zip
Download File

Συγχαρητήρια!

Picture
Μόλις ολοκληρώσατε άλλο ένα Arduino "How to" tutorial και μάθατε να χρησιμοποιείτε το Passive buzzer module. Ελπίζω να σας άρεσε, αν θέλετε μπορείτε να αφήσετε το σχόλιο σας παρακάτω.


Donate us
About us
License
Cookies policy

Visit the biggest Arduino Shop in Greece!

Picture
find us on dwrean.net
find us on Codebender
find us on Instructables
Developed and designed by Vasilakis Michalis Copyright © 2013 Ardumotive All Rights Reserved
All trademarks referenced herein are properties of their
Powered by Create your own unique website with customizable templates.
Design by DivTag Templates