Difference between revisions of "Buzzer Use"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{| style="width: 800px;" |- | =Function of the Module= *'''Please refer to: The Use of Buzzer''' ===Equipment=== {|class="wikitable" |- |Module||Number||Function |- |mC...")
 
 
Line 24: Line 24:
 
The buzzer here we use is passive, which needs a certain frequency to drive. High voltage can't get it alarmed.
 
The buzzer here we use is passive, which needs a certain frequency to drive. High voltage can't get it alarmed.
 
==Hardware Buildup==
 
==Hardware Buildup==
Setup 1:Connect the interface on the back of the buzzer with the D6 port of the Hub.
+
Setup 1: Connect the interface on the back of the buzzer with the D6 port of the Hub.
 
[[File:buzzer-hub.jpg|center|600px]]
 
[[File:buzzer-hub.jpg|center|600px]]
Setup 2:Connect the CoreUSB, Hub and Buzzer together to the computer with a USB cable.
+
Setup 2: Connect the CoreUSB, Hub and Buzzer together to the computer with a USB cable.
 
[[File:buzzer-module_ok.jpg|center|600px]]
 
[[File:buzzer-module_ok.jpg|center|600px]]
 
==Mixly Programming==
 
==Mixly Programming==
*Step1:Open Mixly software. Drag "Buzzer Open" under "Executer" to the editing area.  
+
*Step1: Open Mixly software. Drag "Buzzer Open" under "Executor" to the editing area.  
 
[[File:buzzer-mixly_input.jpg|center|600px]]
 
[[File:buzzer-mixly_input.jpg|center|600px]]
*Step2:"Buzzer Open" module description. Pin 6 is connected on the hardware by default, so you don't have to change it.  
+
*Step2: "Buzzer Open" module description. Pin 6 is connected on the hardware by default, so you don't have to change it.  
 
[[File:buzzer-mixly_explain.jpg|center|600px]]
 
[[File:buzzer-mixly_explain.jpg|center|600px]]
 
*After programming graphically, the buzzer only needs "Buzzer Open" to make a sound.   
 
*After programming graphically, the buzzer only needs "Buzzer Open" to make a sound.   
Line 39: Line 39:
  
 
==Debugging==
 
==Debugging==
*Step1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).   
+
*Step1: Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).   
 
[[File:mixly_board_COM.jpg|400px|center]]
 
[[File:mixly_board_COM.jpg|400px|center]]
*Step2:You can hear the buzzer after uploading successfully. Change the frequency of the buzzer '''Upload again''' to see what happens.  
+
*Step2: You can hear the buzzer after uploading successfully. Change the frequency of the buzzer '''Upload again''' to see what happens.  
 
*The steps above are based on debugging on the computer. The code is inside the core module after uploading, which can also be powered by battery box.  
 
*The steps above are based on debugging on the computer. The code is inside the core module after uploading, which can also be powered by battery box.  
 
[[File:MicroduinoBuzzer-Equipment-ok.jpg|600px|center]]
 
[[File:MicroduinoBuzzer-Equipment-ok.jpg|600px|center]]
Line 58: Line 58:
  
 
==Debugging==
 
==Debugging==
*Step1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).   
+
*Step1: Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).   
 
[[File:mixly_board_COM.jpg|400px|center]]
 
[[File:mixly_board_COM.jpg|400px|center]]
*Step2:The buzzer will produce different sounds continuously after uploading successfully, achieving the effect of alarming.   
+
*Step2: The buzzer will produce different sounds continuously after uploading successfully, achieving the effect of alarming.   
  
 
=Experiment 3: Compose Music with Buzzer=
 
=Experiment 3: Compose Music with Buzzer=
Line 86: Line 86:
  
 
==Debugging==
 
==Debugging==
*Step1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).   
+
*Step1: Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).   
 
[[File:mixly_board_COM.jpg|400px|center]]
 
[[File:mixly_board_COM.jpg|400px|center]]
*Step2:You can hear the buzzer play birthday music after uploading. Users can change music based this principle.  
+
*Step2: You can hear the buzzer play birthday music after uploading. Users can change music based this principle.  
 
|}
 
|}

Latest revision as of 09:45, 13 September 2016

Function of the Module

Equipment

Module Number Function
mCookie-CoreUSB 1 Core board
mCookie-Hub 1 Sensor pin board
Microduino-Buzzer 1 Buzzer sensor
  • Other Hardware Equipment
    • One USB cable
    • One sensor cable

Experiment 1: Buzzer Makes a Sound

Overall

The buzzer here we use is passive, which needs a certain frequency to drive. High voltage can't get it alarmed.

Hardware Buildup

Setup 1: Connect the interface on the back of the buzzer with the D6 port of the Hub.

Setup 2: Connect the CoreUSB, Hub and Buzzer together to the computer with a USB cable.

Mixly Programming

  • Step1: Open Mixly software. Drag "Buzzer Open" under "Executor" to the editing area.
  • Step2: "Buzzer Open" module description. Pin 6 is connected on the hardware by default, so you don't have to change it.
  • After programming graphically, the buzzer only needs "Buzzer Open" to make a sound.
  • Description for other Buzzer items.

Debugging

  • Step1: Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).
Mixly board COM.jpg
  • Step2: You can hear the buzzer after uploading successfully. Change the frequency of the buzzer Upload again to see what happens.
  • The steps above are based on debugging on the computer. The code is inside the core module after uploading, which can also be powered by battery box.
MicroduinoBuzzer-Equipment-ok.jpg

Example 2: Buzzer Gives an Alarm

Overview

To make the buzzer give an alarm.

Hardware Buildup

Same with【Experiment 1: Buzzer Makes a Sound】.

Mixly Programming

  • Adopt "For loop" to change frequency, with which you can change the tone. (The lowest frequency that human ears can hear is about 20Hz and the highest is about 2000Hz. )
  • Find "Loop" in "Control" item and drag it to the editing area.
  • Instruction for "Loop".
  • See syntax description after buildup and you'll find time delay module in "Control".

Debugging

  • Step1: Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).
Mixly board COM.jpg
  • Step2: The buzzer will produce different sounds continuously after uploading successfully, achieving the effect of alarming.

Experiment 3: Compose Music with Buzzer

Overall

To use a buzzer instead of an audio speaker to play music and generate sound with different tones.

Hardware Buildup

Same with【Experiment 1: Buzzer Makes a Sound】.

Mixly Programming

Let's firstly get to learn numbered music notation-Note.

Mixly yinfu 1.jpg
Mixly yinfu 2.jpg
  • Here we adopt the way of array to play music, which is flexible in programming.
  • Drag out "Array" item.

Description for "Array"

  • Drag out "Rhythm" from "Variable Extension".
  • Put the notes and rhythms in "Array".
  • Programming Description
  • Overall code.

Debugging

  • Step1: Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).
Mixly board COM.jpg
  • Step2: You can hear the buzzer play birthday music after uploading. Users can change music based this principle.