background image

 

 

4.

 

Usage 

The speaker can emit a variety of sounds like a car horn, doorbell and ignition. The different sounds are 

based on the frequency of the input signal. 

You can supply different frequency signal to this module with Arduino. Arduino generates these signal via 

PWM or even digital write and delay. Here we are going to show you how to generate these signals using 

delay (), the speaker sound bass 1~7. 

 

/*macro definition of Speaker pin*/ 

#define SPEAKER 3 

 

int

 BassTab

[]={

1911

,

1702

,

1516

,

1431

,

1275

,

1136

,

1012

};

//bass 1~7 

 

void

 setup

()

  

{

 

    pinInit

();

 

}

 

void

 loop

()

 

{

 

    

/*sound bass 1~7*/

 

    

for

(

int

 note_index

=

0

;

note_index

<

7

;

note_index

++)

 

    

{

 

        sound

(

note_index

);

 

        delay

(

500

);

 

    

}

 

}

 

Summary of Contents for Grove-Speaker

Page 1: ...1 Grove Speaker Version 1 0 Release date 9 20 2015 Wiki http www seeedstudio com wiki Grove_ _Speaker Bazaar http www seeedstudio com depot Grove Speaker p 1445 html ...

Page 2: ...2 Document Revision History Revision Date Author Description 1 0 Sep 21 2015 Victor He Create file ...

Page 3: ...3 Contents Document Revision History 2 1 Introduction 2 2 Features 3 3 Specifications 4 4 Usage 5 5 Resource 7 ...

Page 4: ...ision of Seeed Technology Inc this manual has been compiled and published which covered the latest product description and specification The content of this manual is subject to change without notice Copyright The design of this product including software and its accessories is under tutelage of laws Any action to violate relevant right of our product will be penalized through law Please conscious...

Page 5: ...ule which consists of power amplification and voice outputs The loudness can be adjusted by the on board potentiometer With different input frequency the loud speaker generated different tones Coding the music into Arduino DIY your own music box ...

Page 6: ...3 2 Features Volume Adjustable Grove Interface ...

Page 7: ...4 3 Specifications Item Min Typical Max Unit Working Voltage 4 0 5 0 5 5 VDC Voltage Gain 46 dB Band Width 20 KHz ...

Page 8: ...odule with Arduino Arduino generates these signal via PWM or even digital write and delay Here we are going to show you how to generate these signals using delay the speaker sound bass 1 7 macro definition of Speaker pin define SPEAKER 3 int BassTab 1911 1702 1516 1431 1275 1136 1012 bass 1 7 void setup pinInit void loop sound bass 1 7 for int note_index 0 note_index 7 note_index sound note_index ...

Page 9: ...8_t note_index for int i 0 i 100 i digitalWrite SPEAKER HIGH delayMicroseconds BassTab note_index digitalWrite SPEAKER LOW delayMicroseconds BassTab note_index Note Due to the influence of the capacitance the module can only output the bass signal and the treble is unable to emit ...

Page 10: ...7 5 Resource Grove Speaker Eagle File How to generate different tone with MCU Grove_ _Speaker_v1 0_brd pdf Grove_ _Speaker_v1 0_sch pdf LM386 Low Voltage Audio Power Amplifier Datasheet ...

Page 11: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Seeed Studio 107020001 ...

Reviews: