Welcome to AI Voice Interaction Module repository
For PICO2
Pico 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
- Pico
- Voice interaction module
- Dupont line
2. Wiring diagram
| Pico | Voice interaction module |
|---|---|
| 4 | RX |
| 5 | TX |
| GND | GND |
| 5V | 5V |

3. Program download
- Connect Pico to the computer using Type-C

- Open the Thonny software, click Tools in the upper left corner, and select Options

- Select interpreter, select the corresponding serial device in the Port below, and then click OK

- The following picture appears on the terminal, indicating that the connection is correct

- Open the corresponding py file, click the run button above, and hear I am ready, which means that the program is running

4.Achieve the effect
- Select the broadcast content by modifying the code in the program as shown below

- The content of the broadcast can be viewed according to the command word broadcast word protocol list V3_EN file provided in the attachment,
where the first and second bytes are AA FF indicates the frame header of the protocol, the third byte FF indicates the broadcast function, and the fourth is the ID of the broadcast content. Here you can see that "I am ready" is 67 in hexadecimal, so in the program, sending 0x67 to register 0x03 can broadcast the corresponding content. The fifth byte is the end frame.

- After clicking Run, when I say the wake-up word to wake up, and say "close lights", the debugging assistant will reply to receive 0A

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

The first and second bytes are AA FF indicates the frame header of the protocol. The third byte indicates the ID of the ten function words of the chip. The fourth is the command word ID. Here you can see that "close light" is hexadecimal 0A. The fifth byte is the end frame.
- If you say other command words, the serial port debugging assistant will also print the corresponding command word ID. You can try it yourself