Skip to content

JShabtai/EspAudioMux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

This project uses an ESP8266 and a 74HC4052 to control 4 stereo audio channels.

Build/flash

Requirements

The following tools are required and must be available on your PATH

  • nodemcu-tool
  • esptool

To run this on your ESP8266, flash the NodeMcu firmware that is pre-compiled and available in this repo. To do this you must first put the ESP8266 into flashing mode. To do this, hold the flashing button on your module (which is connected to GPIO0) and press the reset button. Then run the following:

make flash

Once that's done successfully, you need to upload the lua files:

make upload

How to use

When the module boots up it will attempt to connect to a WiFi network if it already knows about one. If that fails, then it will automatically enter WPS mode. Simply press the WPS button on your router then restart the ESP8266. The EPS8266 will get the Wi-Fi credentials and connect automatically. This only needs to be done once - the credentials are remembered.

You will need to know the IP of your device to connect to it. When the device connects to a Wi-Fi network it will print out its IP address. Use the following command to restart the device (forcing it to re-connect)

make restart terminal

You will see a line something like this:

Connected to WIFI with IP: 192.168.0.101

It is recommended that you add a DHCP reservation on your router to keep the IP from changing, so you don't need to repeat these steps. If your router supports this, then consult your routers documentation for instructions.

By default the MUX is off, and channel 0 is selected.

API

The module exposes a few simple endpoints to control the MUX:

  • /enable: Turn the MUX on.
  • /disable: Turn the MUX off.
  • /channel/x: Select channel x, where x is between 0 and 3 inclusive

Future improvements

  • Add LEDs to indicate which channel is active or if the device is off
  • Add physical button to switch the channel manually
  • Remember MUX status (on/of and channel)

About

A very simple audio MUX controlled by an ESP8266 running NodeMcu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors