Welcome to AI Voice Interaction Module repository
For Arduino
Arduino serial communication
Note: The voice interaction module needs to be burned with factory firmware. If the voice chip has not been flashed with firmware after receiving it, it does not need to be burned
1. Experimental preparation
- Arduino development board
- Voice interaction module
- Multiple Dupont wires
2. Wiring diagram
| Arduino | Voice interaction module |
|---|---|
| TX | RX |
| RX | TX |
| GND | GND |
| 5V | 5V |

3. Program download
- Connect Arduino to the computer using a download cable

- Open the ArduinoIDE compilation platform, and you can see the serial port number, which is normal.

- Click the right arrow in the upper right corner to download the program, and you can see that the compilation is successful below

- Press the reset button and you can hear "I am ready", indicating that the program has been burned in
4.Achievement effect
- You can select the broadcast content by modifying the code in the program as shown below


- The content of the report can be viewed according to the Command Word Broadcast Word Protocol List V3_EN file provided in the attachment.
The first and second bytes AA FF represent the frame header of the protocol, the third byte FF represents the broadcast function, and the fourth is the ID of the broadcast content. Here you can see "I am ready" is hexadecimal 67, so in the program, send 0x67 to register 0x03 to broadcast the corresponding content. The fifth byte is the end frame.

- Open the IDE serial port,

- After I say the wake-up word, I say "close light" and the debugging assistant will reply with the receiving ID: 10

- At this time, you can open the attached Command Word Broadcast Word Protocol List V3_EN file to view the "Turn off the light" protocol

The first and second bytes AA FF represent the frame header of the protocol, the third byte represents the ID of the ten function words of the chip, and the fourth is the command word ID. Here you can see "close light" is hexadecimal 0A, so decimal will return 10. The fifth byte is the end frame.
- Say other command words, the serial port debugging assistant will also print the corresponding command word ID, you can try it yourself