GithubHelp home page GithubHelp logo

soulbladermd / sfx-i2s-web-trigger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bbx10/sfx-i2s-web-trigger

0.0 0.0 0.0 1.17 MB

ESP8266 Sound F/X I2S web trigger

License: MIT License

C++ 22.21% C 3.02% Arduino 74.77%

sfx-i2s-web-trigger's Introduction

SFX-I2S-web-trigger

ESP8266 Arduino Sound F/X I2S web trigger

ESP8266, I2S DAC, speaker, battery

Press the 0 button to play file T0.wav, press the 1 button to play file T1.wav, etc. The web interface is identical the related project SFX-web-trigger. The other project uses a much more expensive MP3/OGG decoder board. This project uses a $6 I2S DAC with 3W audio amplifier board. The WAV audio files are stored in the ESP8266 Flash.

Most ESP-12s boards and modules come with 4 Mbytes of Flash of which 3 MBbytes is used as a Flash file system named SPIFFS. To store the WAV files in the SPIFFS file system, create a data directory in the same directory with the .INO file. Copy WAV files to the directory with names T0.wav, T1.wav, ... T9.wav. Install the SPIFFS upload tool. Use the tool to upload the WAV files to the ESP8266 Flash.

The WAV files should be mono (number of channels = 1) and contain uncompressed 16-bit PCM audio. Samples rates 11025, 22050, and 44100 have been verified to work. The included test WAV files were generated using Festival (text to speech) software.

Upload the ESPI2S.INO application. Connect any web browser to the ESP8266 web server at http://espsfxtrigger.local. If this does not work use the ESP8266 IP address. This should bring up the web page shown above. Press buttons 0...9 to play WAV files T0.wav ... T9.wav.

If the ESP8266 is unable to connect to an Access Point, it becomes an Access Point. Connect to it by going into your wireless settings. The AP name should look like ESP_SFX_TRIGGER. Once connected the ESP will bring up a web page where you can enter the SSID and password of your WiFi router.

How might this device be used? Load up your favorite sound samples such as elephant trumpet, minion laugh, cat meow, etc. Bury the device in the couch cushions. Wait for your victim to sit down. While you appear to play Candy Crush on your phone, remotely trigger your favorite sound F/X!

Hardware components

Connection Diagram

Adafruit I2S DAC ESP8266 Description
LRC GPIO2/TX1 LRCK Left/Right audio
BCLK GPIO15 BCLK I2S Clock
DIN GPIO03/RX0 DATA I2S Data
GAIN not connected 9 dB gain
SD not connected Stereo average
GND GND Ground
Vin BAT 3.7V battery power

If you need more volume you could use a booster to generate 5V from the battery and drive the DAC board Vin with 5V. Also experiment with the GAIN pin.

Software components

  • WiFiManager eliminates the need to store the WiFi SSID and password in the source code. WiFiManager will switch the ESP8266 to an access point and web server to get the SSID and password when needed.

  • SPIFFS The SPIFFS Flash file system is included with the ESP8266 Arduino board support package. The header file name is FS.h.

  • ESP8266 I2S support is included with the ESP8266 Arduino board support package. The header file names are i2s.h and i2s_reg.h.

  • WebSockets

  • Other components are included with the ESP8266 Arduino package.

sfx-i2s-web-trigger's People

Contributors

bbx10 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.