Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CES Final Project

This project uses an ESP32 TTGO-T1 board with touch sensors and LEDs to trigger audio playback on a laptop over UDP. When a touch sensor is pressed, the ESP32 sends a command to the laptop, and the laptop plays the matching local audio file from the audio/ folder. In addition, the LED light corresponding to the touch sensor also flashed in response. A demo can be found here.

Requirements

  • ESP32 TTGO-T1 board
  • PlatformIO for building and uploading the firmware
  • Python 3.9+ on the laptop
  • pydub and ffmpeg for audio playback

Installation

  1. Open the project in VS Code with the PlatformIO extension installed.

  2. Install the Python dependency:

    pip3 install pydub
  3. Install ffmpeg if it is not already available on your system.

Reproducibility

The firmware and laptop script are configured to work together with these defaults:

  • ESP32 access point SSID: ESP32
  • ESP32 access point password: ESP32_SoundOfNYC
  • UDP port: 4210
  • Audio directory: audio/

The audio files expected by the script are:

  • audio/statue.m4a
  • audio/building.m4a
  • audio/wsp.m4a
  • audio/columbia.m4a

Usage

  1. Build and upload the firmware to the ESP32 using PlatformIO.

  2. Connect the laptop to the ESP32 Wi-Fi network using the SSID and password above.

  3. Start the laptop listener:

    python3 serial_audio_player.py
  4. Touch one of the sensors on the board to trigger playback and the matching LED animation.

Command Mapping

Touch target UDP command Audio file
Statue of Liberty PLAY_STATUE audio/statue.m4a
Empire State Building PLAY_BUILDING audio/building.m4a
Washington Square Park PLAY_WSP audio/wsp.m4a
Columbia University PLAY_COLUMBIA audio/columbia.m4a

Notes

  • The laptop script listens on 0.0.0.0:4210 by default.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages