Updated pin definitions to use SD pins for data input, bit clock, and left-right clock. Also updated noise threshold value.
Audio2MIDI
This project is an Arduino-based application that manages WiFi connectivity, LED control, and ESP device information. It uses the WiFiManager library to handle WiFi connections with fallback to Access Point (AP) mode and a captive portal for configuration.
Features
- WiFi Management: Automatically connects to saved WiFi credentials or starts an AP with a captive portal for configuration if no connection is possible.
- ESP Information: Displays ESP device information such as chip ID and flash size.
- LED Control: Provides functionality for controlling LEDs (e.g., cycling through colors).
- Web Server: (Placeholder for potential web server functionality).
Project Structure
The project is organized as follows:
src/
├── esp_info.cpp # Handles ESP device information
├── esp_info.h
├── index.h # Placeholder for web server content
├── led_control.cpp # Handles LED control logic
├── led_control.h
├── main.cpp # Main entry point for the application
├── web_server.cpp # Placeholder for web server functionality
├── web_server.h
├── wifi_manager.cpp # Manages WiFi connectivity
├── wifi_manager.h
Key Components
main.cpp
The main entry point of the application. It initializes the WiFi manager, prints ESP information, and sets up LED control.
wifi_manager.cpp and wifi_manager.h
Manages WiFi connectivity using the WiFiManager library. It attempts to connect to saved WiFi credentials and falls back to AP mode with a captive portal if the connection fails.
esp_info.cpp and esp_info.h
Provides functions to retrieve and display ESP device information such as chip ID and flash size.
led_control.cpp and led_control.h
Handles LED control logic, such as cycling through colors or setting specific patterns.
web_server.cpp and web_server.h
(Placeholder) Intended for implementing web server functionality.
Setup and Usage
Prerequisites
- Arduino IDE or PlatformIO
- ESP8266 or ESP32 microcontroller
- WiFiManager library installed
Installation
-
Clone this repository:
git clone https://github.com/your-username/audio2midi.git cd audio2midi -
Open the project in your preferred IDE (e.g., Arduino IDE or VS Code with PlatformIO).
-
Install the required libraries:
-
Configure your microcontroller board and upload the code.
Usage
- Power on the ESP device.
- The device will attempt to connect to saved WiFi credentials.
- If no connection is possible, the device will start an AP named
AudioToMIDI-APwith the passwordpassword123. - Connect to the AP and configure the WiFi credentials through the captive portal.
- Once connected, the device will proceed with its functionality (e.g., LED control, ESP info display).
Customization
- AP Name and Password: Modify the AP name and password in
wifi_manager.cpp:wm.autoConnect("AudioToMIDI-AP", "password123"); - LED Behavior: Customize LED patterns in
led_control.cpp.
Troubleshooting
- If the device fails to start the AP or connect to WiFi, ensure the
WiFiManagerlibrary is installed and the ESP device is properly configured. - Check the serial monitor for debug output.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
- WiFiManager for simplifying WiFi configuration.
Visit http://[esp-ip]/list to see all files in SPIFFS Verify that you see /www/index.html and /www/dashboard.html listed If files are not listed, you need to upload them to SPIFFS using PlatformIO's "Upload Filesystem Image" task