Calliope mini speaker
With the Calliope mini V3 hardware, the built-in speaker will play (mirror) the same tones and music sent to the audio pin.
Set the pin (P0, P1, P2, P3) that is used to play music and generate tones.
pins.setAudioPin(AnalogPin.P0)
P0
, P1
, P2
, or P3
.Play a tone for the “A4” note at pin P0 for 1 second.
pins.setAudioPin(AnalogPin.P0)
let frequency = 440
let duration = 1000
pins.analogPitch(frequency, duration)
Calliope mini pins, set audio pin enabled, analog set pitch pin