Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CTXz/f1a79daf2f34b528b8b93e98c4916919 to your computer and use it in GitHub Desktop.
Save CTXz/f1a79daf2f34b528b8b93e98c4916919 to your computer and use it in GitHub Desktop.

Preparation

Download this ESP8266 toolchain to ~/esp8266:

$ git clone https://github.com/gschorcht/RIOT-Xtensa-ESP8266-toolchain.git ~/esp8266

Install the required dependencies for ColorChord:

# apt install libpulse-dev libasound2-dev libx11-dev libxext-dev libxinerama-dev libusb-1.0-0-dev libudev-dev python2.7-minimal

Link /usr/bin/python to /usr/bin/python2.7:

# ln -s /usr/bin/python /usr/bin/python2.7

Get pip2.7:

$ wget https://bootstrap.pypa.io/get-pip.py
# python2.7 get-pip

Install pyserial:

# pip2.7 install pyserial

Clone the ColorChord repo:

$ git clone --recurse-submodules https://github.com/cnlohr/colorchord.git

Compiling

Enter the embedded8266 directory:

$ cd colorchord/embedded8266

Open the user.cfg file and uncomment #OPTS += -DFREQ=12500, adjust the parameters as you like. In ccconfig.h, update the NUM_LIN_LEDS config to the size of your LED strip.

Once everything is ready, run:

$ make all

Hardware

Now that the software has been compiled, its time to set up the hardware:

Connect the audio source to A0, the WS2812 GND pin to any of theG pins, the DIN pin to RX and the 5V pin to VV. Then connect the NodeMCU via USB and run:

$ make burn

Reset the NodeMCU and in little time a new WiFi network with the name ESP_XXX... should pop up. Connect to the network and open the IP address for the webserver in your browser (default 192.168.4.1). Feel free to then configure the software parameters, such as the number of used LEDs, the initial amplitude etc.

ColorChord should now be set up and working on your NodeMCU. Happy raving :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment