|
楼主 |
发表于 2019-9-26 17:45:24
|
显示全部楼层
- /*
- 【Arduino】108种传感器模块系列实验(资料+代码+图形+仿真)
- 实验一百二十六:JQ6500语音模块 MP3模块 MCU串口控制播报
- GitHub官网:https://github.com/sleemanj/JQ6500_Serial#jq6500_serial
- 库文件 下载:http://sparks.gogo.co.nz/JQ6500_Serial.zip
- 项目:MP3播放器的最小示例,只需循环播放所有曲目。
- */
-
- #include <Arduino.h>
- #include <SoftwareSerial.h>
- #include <JQ6500_Serial.h>
- // Create the mp3 module object,
- // Arduino Pin 8 is connected to TX of the JQ6500
- // Arduino Pin 9 is connected to one end of a 1k resistor,
- // the other end of the 1k resistor is connected to RX of the JQ6500
- // If your Arduino is 3v3 powered, you can omit the 1k series resistor
- JQ6500_Serial mp3(8,9);
- void setup() {
- mp3.begin(9600);
- mp3.reset();
- mp3.setVolume(20);
- mp3.setLoopMode(MP3_LOOP_ALL);
- mp3.play();
- }
- void loop() {
- // Do nothing, it's already playing and looping :-)
- }
复制代码 |
|