Welcome to AI Voice Interaction Module repository
For PICO
Pico IIC 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 |
|---|---|
| GP14 | SDA |
| GP15 | SCL |
| 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, you can see the terminal print the received command word ID

- After I say the wake-up word to wake up, say "close light", the debugging assistant will reply with the received 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