Code Monkey home page Code Monkey logo

wifi-matrix's Introduction

WiFi-Matrix

12x12 RGB LED Matrix based on the ESP8266 and WS2812B leds that can display GIF files from the SPIFFS, visualize audio from a microphone input and runs a small web interface.

Disclaimer: I'm not actively working on this project anymore, but it can give a decent example and guideline on how to create a more complex ESP Project with WebInterface and Rest API.

Usage

  • In the ESPController/src/ directory, rename Settings-example.h to Settings.h and enter your WiFi credentials and custom settings.
  • Copy the contents of WebInterface/ into ESPController/data/htdocs/. For simplicity, you may want to create a symlink instead.
  • Open ESPController/ in PlatformIO (to open the project in Arduino IDE, rename main.cpp to ESPController.ino) and make sure, you installed all required libraries and boards.
  • You can now burn the SPIFFS image (ESPController/data/) and upload the code.

The project layout

ESPController

This is the main Arduino Project. The code does multiple things:

  • It constantly renders out an image to the LEDs.
    • If Animation mode is enabled, it fetches all gif files one after another and decodes them using Craig Lindley's GifDecoder.
    • If Visualization mode is enabled, a short number of samples is recorded from the microphone and passed into an FFT to get the frequency bands. Then a visualization is rendered based on the FFT.
  • It waits for clients to connect via http.
    • The ESP acts like an http web server: If a requested file exists in the htdocs directory, it is returned to the client. If the root path / was requested, the index.html file is returned.
    • A Rest-API is running on the path /api/, which allows asynchronous communication between the client and the ESP. A more detailed description on the api can be found by importing matrix.postman_collection.json into Postman.

WebInterface

This is the main http web inteface that runs on the ESP. It uses Vue, Vuetify and axios from a remote server to minimize the file size on the ESP.

VirtualMatrix

This directory is entirely optional. As I didn't have access to the actual matrix all the time when developing, I created this emulator written in python3.

In the Settings.h file, SERIAL_MATRIX_DATA must be enabled. The Virtual Matrix script will then filter out led instructions and display them on a pygame canvas. Other debug messages are passed to the console.

For large matrices, the amount of serial data may slow down the ESP quite a bit, which can alter the speed at which gif animations are played back on a real matrix.

wifi-matrix's People

Contributors

amonbenson avatar

Stargazers

 avatar  avatar Gonzo Gear avatar  avatar  avatar  avatar PR77 avatar well avatar  avatar  avatar  avatar Tonny avatar  avatar Y.A.K.E avatar matteo avatar  avatar realJustinBruce avatar  avatar  avatar  avatar  avatar

Watchers

James Cloos avatar Scotty Franzyshen avatar  avatar  avatar  avatar  avatar

Forkers

eigie

wifi-matrix's Issues

[FR] Support 8x32 Matrix?

I build an AWTRIX display. Internal it is a 8x32 WS2812b matrix. The client part (e.g. ESP8266) is open source but the server part is closed source.
It is also written in JAVA and use permanent CPU usage. The display is working fine but nevertheless I'm looking for somehting similar and your project looks like that.
Are you interessent in support such a display?

esp8266 ws2812b 32x8

hi ich habe ein prolem, uns zwar nutze ich Arduino IDE und mein esp verbindet sich nicht mit dem netzwerk.

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.