用ESP8266做的WiFi音频频谱分析器

This is a fun project inspired by Charles Lohr's video https://www.youtube.com/watch?v=8ISbmQTbjDI A 8x8 RGB LED module (WS2812b) is connected to the I2S port of ESP8266. ESP8266 also runs a WebSocket server. It listens on port 8080 for display frame data. Once the data is received, it is pushed to the LED Matrix via DMA/I2S. The client side is a HTML5/JS webpage. When an audio file is selected, the Javascript program uses WebAudio APIs to decode and analyze the audio data. The audio spectrum is then bin'ed into 8 sections and send to the ESP8266 WebSocket port. I'm building this project using my own designed ESP8266 breakout board. But since it only uses GPIO RX pin, all ESP modules can be supported.

Hardware Setup

The general hardware setup is as the following picture. You do need a proper programming header connected for downloading, or use NodeMCU board. In this project I'm using my own developed ESP8266 breakout board, and everything is setup on a perfboard.

Programming Environment

I'm using the "Unofficial DevKit for ESP8266" http://programs74.ru/udkew-en.html . The setup details are discussed over at http://www.esp8266.com/viewtopic.php?f=9&t=820

Source Code

I have put all source codes on https://github.com/baoshi/ESP-Audio-Spectrum

Running

The ESP8266 starts as AP. Connect your computer to ESP-xxx WiFi Access Point and type 192.168.4.1 in the browser to see the demo. Check the linked video below for demonstration.

Demo

我来评几句
登录后评论

已发表评论数()

相关站点

+订阅
热门文章