Make Food Scared with Teensy 4.1

We all love a good treat when it comes to Halloween, so why not add some shock and horror to your food by making it scream!

This can be done using a variety of boards, this guide covers using the Teensy 4.1 with the Audio Shield (Rev.D), and an SD Card to contain the sounds.

To get setup with the Teensy boards, see our guide here.

Code Setup

The example code for this sketch can be downloaded from this location, along with the example WAV file to go on your SD Card.

The project can be uploaded onto the Teensy 4.1 board at this point (see below to change the sounds for your own).


Hardware Setup

Insert the SD Card into the Teensy Audio Shield (with your sound file uploaded).

Fit the Teensy 4.1 onto the Audio Shield using the headers.

Connect your speakers to the 3.5mm connector on the Audio Shield.

Wire pin 31 to the foil beneath your foo, either by covering a board in foil, or using a foil tray to put your food upon.

Wire pin 30 to the metal knife/tongs which are used to touch the food.

Plug the speakers in and power up the Teensy board, and when your knife/tongs touch the food, you should hear a scream!


Changing the Sounds

The sounds will need to be saved as WAV files, with 16-bit PCM Encoding, at a bit rate of 44100Hz.  This can be done with various tools, we have used Audacity to achieve this.


  1. Open your Sound file in Audacity
  2. Right click on the track, and click Format > 32bit float
  3. Right click the track again and click Rate > 44100 Hz
  4. Click File > Export > Export as WAV
  5. Save As Type: WAV (Microsoft)
  6. Set Encoding: Signed 16-bit PCM
  7. Enter the file name and click save
  8. Upload the file to your SD Card
  9. Ensure the name in the sketch matches the file name on the SD Card


Note Icon Note:

The file name needs to be in uppercase 8.3 format, so keep it very simple and short e.g. "TEST1.wav"


Video of it Working