s-marley / ESP32-INMP441-Matrix-VU

And ESP32 powered VU matrix using the INMP441 I2S microphone
MIT License
85 stars 28 forks source link

ESP32-INMP441-Matrix-VU

IMPORTANT: For now, the code will only work with ESP32 core 1.0.6, and is unreliable on 2.0.0. I'm thinking this is a FastLED issue, but I might be wrong on that! Use the boards manager to revert to 1.0.6 in order to compile and upload.

This is the repository for a 3D-printed, (optionally) battery-powered, WS2812B LED matrix that produces pretty patterns using audio input from an INMP441 digital microphone and running on an ESP32. Watch the explanatory video at the YouTube link below:

Youtube video of VU meter in action

Hardware

At a minimum, you will need:

No battery schematic

If you want to battery power your creation, you will also need:

Battery schematic

Software

Regarding software you have two main options, the software given in this repository or WLED sound reactive fork. The hardware connections are the same for either option. There are many advatages of using WLED over this software, it's a much more complete solution with better support for syncing multiple controllers setting up playlists of patterns and customising the patterns that exist. The only realy advantage of my software is that I wanted to write my own patterns and be able to completely customise how things worked. The choice is yours. If you want to use my software, read on...

Software setup

  1. Download the code, and make sure you have all of the required libraries installed. They are listed at the top of the .ino file.
  2. Make sure your matrix is set up correctly in the software for input position, and wiring style. See notes at the top of the .ino file for more details.
  3. Change M_WIDTH and M_HEIGHT to the correct number of LEDs for your matrix.
  4. Go into web_server.h and change ssid, password, ssid2, and password2 to your primary and backup network credentials.
  5. Upload the code to your ESP32 and hope for the best!

Using the matrix

Every time you power the matrix, it will attempt to connect to the primary WiFi network for 5 seconds. If this fails, it will try the secondary credentials for 5 seconds. If this also fails, it will fall back to whatever its previous setting were, but you will be unable to make any changes. I have the secondary credentials set to the hotspot on my phone, so I can use the device outside of my home network. If it succeeds in connecting to a network, the local IP of the ESP will scroll across the screen. Go to this address in any browser to change the settings. The settings that can be altered are: