SunFounder PiCrawler Kit
Install i2samp
Before using that functions, first activate the speaker so that it will be enabled and can make sounds.
Run i2samp.sh in, and this script will install everything needed to use i2s amplifier.
cd ~/picrawler/
sudo bash i2samp.sh
There will be several prompts asking to confirm the request. Respond to all prompts with a Y. After the changes have
been made to the Raspberry Pi system, the computer will need to reboot for these changes to take effect.
After rebooting, run the i2samp.sh script again to test the amplifier. If a sound successfully plays from the speaker,
the configuration is complete.
Run the Code
cd ~/picrawler/examples
sudo python3 sound_effect.py
After the code runs, please operate according to the prompt that printed on the terminal.
Input key to call the function! * q: Play background music * 1: Play sound effect * 2: Play sound effect with threads
* t: Text to speak * If you want to exit the program, press Ctrl+C.
3.5. Sound Effect 45