27352603df85e714d52e205ad82bd0829d90304f
ESP32-P4 Waveform Generator
Simple firmware and HMI to generate square waveforms on a selected GPIO pin.
Features
- User-selectable GPIO pin.
- Configurable frequency from 0Hz to 5000Hz (5kHz).
- Real-time control via USB/Serial.
Project Structure
firmware/: ESP-IDF project for ESP32-P4.hmi/: Python script for the Graphical User Interface.
Prerequisites
- ESP-IDF v5.x installed and configured in your environment.
- Python 3.x with
pipinstalled.
Building and Flashing Firmware
- Navigate to the firmware directory:
cd firmware - Set the target to esp32p4:
idf.py set-target esp32p4 - Build and flash the firmware:
idf.py build flash monitor
Running the HMI
- Navigate to the hmi directory:
cd hmi - Install dependencies:
pip install -r requirements.txt - Run the application:
python hmi.py
Usage
- Connect your ESP32-P4 board via USB.
- Select the correct COM/Serial port in the HMI.
- Enter the GPIO pin you want to use (e.g., GPIO 21).
- Set the desired frequency using the slider or text box.
- Click Apply to start/update the waveform.
- Setting frequency to 0 will stop the output.
Description
Languages
Python
42.7%
Rust
37.4%
C
15.4%
Shell
1.4%
D
1.3%
Other
1.8%