当前位置:网站首页>Arduino uno connected to jq8900-16p voice broadcast module
Arduino uno connected to jq8900-16p voice broadcast module
2022-06-11 02:53:00 【Three stinky ginger】
Arduino Uno Pick up JQ8900-16p Voice broadcast module
Preface
Record an easy-to-use voice broadcast module JQ8900, This module is cheap ( You can buy it for a dozen dollars ), Easy to use .
Besides , This module also has the following advantages :
① Equipped with supporting software, it can support text to voice , Generate mp3 File format , Can be like U Copy to the module like a disk , And choose to play a... In the code mp3 file ;
② There are many voices to choose from , Adjustable volume 、 Tone and speed of sound .
One 、 Required materials and wiring
Main materials required :
1.Arduino Uno Development board ;
2.JQ8900-16p Voice broadcast module ( Including horn ) One ;
3. There are several DuPont lines
The voice broadcast module is shown in the figure below :
take mp3 The file copy enters the memory connection of the module : Find a suitable data cable , End to end JQ8900 modular , The other end is connected to the computer USB mouth , Just copy the file directly .
Arduino control JQ8900 Module wiring :
| Arduino Uno | JQ8900-16p |
|---|---|
| 3 | VPP |
| GND | GND |
| 5V | DC-5V |
| JQ8900-16p | horn |
|---|---|
| SPK- | Positive pole |
| SPK+ | Negative pole |

( The white one is the horn )
Two 、 Code
Select the corresponding... Through serial port control mp3 File playback :
/* Integrate system functions : 1. Voice prompt - A serial port choice mp3 Play */
char val="";// Receive the value sent from the serial port
int pin = 3;// Pick up vpp Pin
void setup()
{
pinMode(pin,OUTPUT);
Serial.begin(9600);// set baud rate
Serial.println(" Please input the data you want to send :");// Prompt character
}
void loop()
{
while(Serial.available()>0){
// Check whether there is data in the serial port buffer , Return if any 1, No is 0.
val = char(Serial.read());//Serial.read() Read data from the serial port buffer bit by bit
delay(10);
if(val=='S')
Sys_start();
if(val=='T')
Say_thanks();
}
}
// System started - Voice prompt
void Sys_start()
{
// Set the volume to 20
SendData(0x0a); // Clear numbers
SendData(0x02); // The volume 20
SendData(0x00);
SendData(0x0c); // set volume
delay(2000); // Time delay
// Select a track 1 Play
SendData(0x0a);// Clear numbers
SendData(0x01);// Track number , Corresponding 00001.mp3
SendData(0x0b);// Music selection and playback
delay(2000);
// Start playing
//SendData(0x11);// Start playing
//delay(2000);
}
// Thank you for using. - Voice prompt
void Say_thanks()
{
// Set the volume to 20
SendData(0x0a); // Clear numbers
SendData(0x02); // The volume 20
SendData(0x00);
SendData(0x0c); // set volume
delay(2000); // Time delay
// Select a track 2 Play
SendData(0x0a);// Clear numbers
SendData(0x02);// Track number , Corresponding 00002.mp3
SendData(0x0b);// Music selection and playback
delay(2000);
// Start playing
//SendData(0x11);// Start playing , This part can be without
//delay(2000);
}
void SendData (char addr )// Sending function
{
digitalWrite(pin,HIGH); /* Start pulling up */
delayMicroseconds ( 1000 );
digitalWrite(pin,LOW); /* Start boot code */
delayMicroseconds ( 3200 );/* The delay here should be at least greater than 2ms*/
for (int i = 0; i < 8; i++ ) /* in total 8 Bit data */
{
digitalWrite(pin,HIGH);
if ( addr & 0x01 ) /*3:1 Represents a data bit 1, Each bit is represented by two pulses */
{
delayMicroseconds ( 600 );
digitalWrite(pin,LOW);
delayMicroseconds ( 200 );
}
else /*1:3 Represents a data bit 0 , Each bit is represented by two pulses */
{
delayMicroseconds (200);
digitalWrite(pin,LOW);
delayMicroseconds ( 600 );
}
addr >>= 1;
}
digitalWrite(pin,HIGH);
}
The effect is to input different values through the serial port to select different mp3 Play .
Related information
Speech synthesis software and materials related to the speech broadcast module :
link :https://pan.baidu.com/s/1q0tWEnxipMKokLdAQdNoUQ?pwd=sv4m
Extraction code :sv4m
– From Baidu network disk super member V5 The share of
边栏推荐
猜你喜欢

app 测试 常用 adb 命令集合

怎样简洁明了地说清楚产品需求?

你的公司会选择开发数据中台吗?

Istio installation and use

Limiting visibility of symbols when linking shared libraries
![[Fibonacci series]](/img/03/70b1363e91142a8600d97c59b01b0f.png)
[Fibonacci series]
![[implementation of bubble sorting]](/img/c9/5e4aa246c89fd03a184dbd00161f97.png)
[implementation of bubble sorting]

Setting access to win10 shared folder without verification

从绿联冲刺IPO,看手机配件市场沉浮录

Flat data to tree and tree data flattening
随机推荐
App test_ Summary of test points
AOSP ~ WIFI默认开启 + GPS默认关闭 + 蓝牙默认关闭 + 旋转屏幕关闭
MySQL is required to sort in ascending order greater than or equal to the current time, and then in descending order less than the current time
求MySQL先按大于等于当前时间升序排序,再按小于当前时间降序排序
What can the enterprise exhibition hall design bring to the enterprise?
Databinding escaping with presentation symbols
新来的同事问我 where 1=1 是什么意思???
码农的进阶之路 | 每日趣闻
Use of CIN and cout
Problèmes de classe d'outils JDBC
mysql重装时写my.ini配置文件出错
jdbc工具类的问题
CPT 102_LEC 18
Forest v1.5.22 发布!支持Kotlin
近期学习和更新计划
剑指 Offer II 079. 所有子集
Navicat premium 15 tool is automatically deleted by anti-virus protection software solution
Jetpack compose scaffold and bottomappbar (bottom navigation)
Explanation of spark common parameters
CPT 102_LEC 15