
上QQ阅读APP看书,第一时间看更新
How to do it...
Let's perform the following steps:
- Run the following lines of code in the REPL. You should hear a beeping sound at a frequency of 900 Hz played for 0.2 seconds:
>>> from adafruit_circuitplayground.express import cpx >>> cpx.play_tone(900, 0.2)
- Execute the following code so that a lower frequency beep will be played for a longer duration:
>>> cpx.play_tone(500, 0.4)