Luke's Cricket Chirper
Sound Output
Sound Output
What I wanted to learn, and why it interested me: I wanted to learn how to output custom sounds through my computer. I thought this would be interesting because I could play funny sounds at my friends.
Final outcome: I used a microSD card provided by Zach to upload an .mp3 file to the Arduino through a DFPlayer Mini. From there, I had the Arduino communicate with a small speaker to play a cricket sound whenever a latching switch was held down.
Images of final creative/exploratory output
From left to right: an arduino with wires, such as ground, power and digital pins, connecting itself to the breadboard. The breadboard has a speaker and a dfplayer mini mp3 reader, which takes the attached microsd and reads the sound on the card. There is a yellow latching button that completes the circuit to play the sound. A representative green cricket lego figure sits to the right of the breadboard.
A video of the process happening
Process images from development towards creative/exploratory output
Initial wiring and configuration for the technical training sequence. Instead of a latching button, there is a small push button.
A video of the testing happening. There is a different sound than before.
Process and reflection:
I started off by promoting ChatGPT on the resources and code I would need to put together this cricket chirper. I downloaded the .mp3 file to my microSD card and uploaded the code to the Arduino Uno. When I first set up my circuit, the chirping sound worked pretty quickly; however, I had to add the button component for the technical training. I spent a lot of time trying to get that to work, only to realize I had mixed up my ground and power strips on my breadboard. Zach's magical presence also helped get the thing to work. To progress the interaction, I soldered a latching switch, so that the sound would be continuous as long as the latching switch was held. Finally, I switched the initial button out with the latching switch I soldered extension wires to, which worked quite well. However, troubleshooting with the electrical circuit stuff proved to be difficult, and I found the most consistent method to get it to work was pressing the reset button.
I definitely re-learned how tough troubleshooting hardware problems is and on top of that, how helpful ChatGPT can be with that (surprisingly, it is not helpful at all.) I guess this makes a pretty compelling case on why I need to really get a firm understanding of how to do Physical Computing.
Technical details
Electric schematic
/*
60-223 Intro to Physical Computing, fall 2025
Domain-specific Skill Building exercise: Luke's Cricket Chirper
The program waits for a button press and plays an audio track on the DFPlayer Mini .mp3 reader. The button is wired so when a circuit to ground is completed, the Arduino detects a LOW signal. Each time the button is pressed, the Arduino sends a command to the DFPlayer to play the first audio file on the SD card (0001.mp3). A short delay prevents multiple triggers from one press.
Pin mapping:
Arduino pin | role | details
------------------------------
2 input latching button
10 output attached to dfminiplayer read
11 input attached to dfminiplayer transfer
Released to the public domain by the author, January 2024
Robert Zacharias, rzachari@andrew.cmu.edu
*/
//sourced 100% from CHATGPT on September 29th, 2025
#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>
SoftwareSerial mySerial(10, 11); // TX (10), RX (11)
DFRobotDFPlayerMini myDFPlayer;
const int buttonPin = 2;
void setup() {
pinMode(buttonPin, INPUT_PULLUP); // button to GND when pressed
mySerial.begin(9600);
Serial.begin(9600);
if (!myDFPlayer.begin(mySerial)) {
Serial.println("DFPlayer not detected!");
while (true);
}
myDFPlayer.volume(15); // set volume (0–30)
Serial.println("System ready. Press button to play cricket sound.");
}
void loop() {
if (digitalRead(buttonPin) == LOW) { // button pressed
myDFPlayer.play(1); // play "0001.mp3"
delay(1000); // debounce + prevent retrigger
}
}