Erik Fredericks, frederer@gvsu.edu Winter 2026
https://efredericks.github.io
Block programming in a simulator
Program device
Try it out on the speakers!
In a browser, go to:
Click 'New Project'
Give it a name!
Click create and then select the adafruit-circuit-playground-bluefruit
Let's make a sound on a button press.
Click Input and get an on button A click field.
Input
on button A click
Now, pop a sound in. Click Music and then play sound ba ding until done and drag that inside the button event.
Music
play sound ba ding until done
This is all on your computer - let's put it on a device!
Click the Download button - a *.uf2 file will download to your computer.
Download
*.uf2
Make sure the device is plugged in! If you don't see a CPLAYBTBOOT folder in your file explorer then click the small button in the middle of to reset it.
CPLAYBTBOOT
.uf2
Add the play <waveform> node to your forever block
play <waveform>
forever
First add a variable - click Variables and Make a variable and call it soundActive
Variables
Make a variable
soundActive
Then, drag the set soundActive to 0 field to the on start block
set soundActive to 0
on start
1
Add another button block and have it respond to Button B.
Inside that block, change the soundActive variable to be the opposite!
Also, add the stop all sounds block so that things stop!
stop all sounds
In your forever block, add an if statement to play sound! This will involve adding a bunch of things, so good luck!
if
Add another input, this time for a touch sensor
Then, add a lightshow!
If you want to test out your program on a better speaker, here's how it can be wired up!
GND
AUDIO
show the simulator now