We'll be using CircuitPython for this project. Are you new to using CircuitPython? No worries, there is a full getting started guide here.
Adafruit suggests using the Mu editor to edit your code and have an interactive REPL in CircuitPython. You can learn about Mu and its installation in this tutorial.
Follow this guide for instructions on installing the latest release version of CircuitPython for the Feather M4 Express.
You'll also need to add the following libraries for this project. Follow this guide on adding libraries. The ones you'll need are:
Download the latest adafruit-circuitpython-bundle .zip file as instructed in the guide linked below. Unzip the file and drag those libraries to the lib folder on your Feather M4 CIRCUITPY drive (create it if it does not already exist).
If you're new to the wonderful Crickit board, take a look at the main guide here. You'll notice the Crickit has its own micro USB port -- this is used only occasionally to update the seesaw firmware on the Crickit itself. You can follow these instructions on updating to the latest firmware before getting started.
The Crickit FeatherWing has a 3W class-D audio amplifier built in. By default, it is not connected to the Feather's pin A0 DAC (digital-analog converter) pin, since you can also choose to connect it to a PWM pin. We'll be using the A0 DAC output pin, so go ahead and solder a jumper across the pads shown here to send the DAC audio to the amp.
You can use a small wire or solder blob to get the job done, however, I like to use two male header pins and a jumper shunt so that I can "mute" the speaker easily by lifting the shunt.
Solder two male header pins to the pads labeled "Audio"
Connect them with a jumper shunt to send the Feather M4 pin A0 DAC output to the Crickit FeatherWing's Class-D amplifier
Now, we're ready to build the sensor circuit, and connect it to the Crickit, along with the speaker, servo, and power.