Play MP3 and WAV format files saved on a Micro SD. As the audio is played while reading the file, the file size is not limited as long as the capacity of the Micro SD can handle it. Note that boards equipped with 32-bit microcontrollers such as GR-SAKURA and GR-CITRUS can play MP3 files, but boards such as GR-COTTON and GR-KURUMI can not play MP3 files.
Prepare a Micro SD card and a piezoelectric sounder for storing music files.
However, because the sound is small with a piezoelectric sounder, the recommended configuration is to use a stereo mini jack sold by Akizuki Denshi, and connect a speaker with an amplifier or an earphone.
GR-SAKURA & GR-KAEDE
The Micro SD socket is installed on the GR board from the beginning, so prepare the board and the USB cable. Audio signals are output from pins 6 and 7. Both pins are the same audio signal. Connect as shown in the image on the right.
For piezoelectric sounders, connect to pin 6 and GND. The connection is simple but the sound is small.
|Connect to||6 or 7|
For stereo jacks: Connect the jack to the breadboard and connect it to the board with a wire. Connect pin 6 and GND to the R and G of the jack respectively. Also, pin 7 and GND to L and G respectively. It becomes stereo if it connects.
Since the audio signal is output from pin 0, connect a piezoelectric sounder or stereo jack using the example of GR-SAKURA mentioned above. There is one wire in the picture, but the L of the stereo jack is connected to pin 0 of GR-CITRUS.
|L OR R||0|
GR-COTTON & GR-KURUMI
It is necessary to connect the module of Micro SD socket. When using the Micro SD DIP kit sold by Akizuki Electronics, connect as follows. Since audio signals are output from pins 3 and 5, connect a piezoelectric sounder or stereo jack using the example of GR-SAKURA described above.
|L or R||3|
|R or L||5|
|SD Side Pin||Pin Name||GR Board Side Pin||Remarks|
|4||VDD||VCC or +3V|
|9||For Detection||9||Even with GND fixed OK|
Create a Project with the Web Compiler
There is a template for playing back sound from an SD card in the Web compiler, just select a template for the board to be used, create a project, build it, and write a bin file.