How to do it...

Let's perform the following steps:

  1. Run the following lines of code in the REPL:
>>> from adafruit_circuitplayground.express import cpx
>>> E5 = 659
>>> C5 = 523
>>> G5 = 784
>>> cpx.play_tone(E5, 0.15)

You should hear the E5 musical note play on the speakers for 0.15 seconds.

  1. Use the following code to play the C5 and G5 musical notes for 0.15 seconds:
cpx.play_tone(C5, 0.15)
cpx.play_tone(G5, 0.15)