- MicroPython Cookbook
- Marwan Alsabbagh
- 55字
- 2021-06-24 14:28:14
How to do it...
Let's perform the following steps:
- Copy the hello.wav file to the device in the same folder as the main.py file. Then, run the following lines of code in the REPL:
>>> from adafruit_circuitplayground.express import cpx >>> cpx.play_file('hello.wav')
- You should hear the board say "Hello" as it plays back the audio file.