跳到主要内容

Grove - Speaker Plus

pir

Grove Speaker Plus consists of a powerful amplifier driver board and high-quality speaker. The speaker generates different tones with different input frequency, easy to control with PWM signal. You could create distinctive sound effects, play your favourite songs, or build your own music box with easy coding or a large number of existing music code.

Compare to the last version of Grove Speaker, Grove Speaker Plus has a better quality speaker with separated and replaceable speaker design, which enables you to replace with other loudspeakers you like. With the help of the on-board potentiometer, you can easily adjust the output volume. Already tired of fixed speaker with poor sound quality? Want to connect and play your own speaker? Here is your choice.

Features

  • Good sound quality speaker with high volume
  • Separated and replaceable speaker design
  • Sound adjustable function with onboard potentiometer
  • Easy to use plug and play interface
提示
More details about Grove modules please refer to [Grove System](https://wiki.seeedstudio.com/Grove_System/)

Specifications

ParametersValues
Dimensions130mm x90mm x12mm
WeightG.W 12g

Platforms Supported

ArduinoRaspberry Pi
警告
The platforms mentioned above as supported is/are an indication of the module's software or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software library.

Getting Started

Materials Requied

Seeeduino LotusGrove Speaker Plus
enter image description hereenter image description here
Get ONE NowGet ONE Now

Hardware Connection

Grove-Speaker Plus'' OUTCOME

Usage

Play with Arduino

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.

NoteCorresponding frequencyHalf cycle
1261.62556531911.128216
1.5277.1826311803.864832
2293.66476791702.621678
2.5311.12698371607.060866
3329.62755691516.863471
4349.22823141431.728466
4.5369.99442271351.371722
5391.9954361275.525055
5.5415.30469761203.935334
64401136.363636
6.5466.16376151072.584446
7493.88330131012.384907

Software Code

Step 1. Connect Grove - Speaker Plus to port D3 in a Base Shield and plug the Base Shield to your Seeeduino.

Step 2. Link Seeeduino to your PC via an USB cable.

Step 3. Upload the code below into your Arduino IDE.

提示
    If this is the first time you work with Arduino, we strongly recommend you to see [Getting Started with Arduino](https://wiki.seeedstudio.com/Getting_Started_with_Arduino/) before the start.
/*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);
}
}
void pinInit()
{
pinMode(SPEAKER,OUTPUT);
digitalWrite(SPEAKER,LOW);
}
void sound(uint8_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.
提示
 When the code finishes uploaded, you will hear the Speaker making a DO to SI sound.

Schematic Online Viewer

Resources

Tech Support

if you have any technical issue. submit the issue into our forum.


Loading Comments...