This version works for me, it might not work for you.
email mm5agm@outlook.com
I've stopped work on this project for the time being.
ESP32-S3 based GUI for controlling stepper motor systems using ESP-NOW wireless communication. Features comprehensive debugging capabilities.
THe home position is detected by hardware using the TCRT5000 Infrared Reflective Photoelectric Switch IR Tracking Sensor Module. Since my magloop capacitor can move 360 degrees I have decided against having an end stop indicator. I may add that later.
- ESP-NOW receives position from StepperController
- Raw position shown in RX message box
- Position is updated and shown in the GUI
src/
├── main.cpp # Main application logic
├── globals.cpp, globals.hpp # Global variables and constants
├── devices/
│ └── JC4827W543C.hpp # Device-specific configuration
├── fsm/
│ ├── stepper_gui_fsm.cpp # Finite state machine logic
│ └── stepper_gui_fsm.hpp # FSM header
include/
├── Arial_Arrows_14.h # Custom font for UI elements
├── globals.hpp # Shared global declarations
├── lv_conf.h # LVGL configuration
MagLoop_Common_Files/
├── circular_buffer.h # Utility for buffering
├── stepper_commands.h # ESP-NOW command definitions
├── stepper_helpers.h # Utility functions
lib/
├── Touch_GT911/
│ ├── Touch_GT911.cpp # Capacitive touch driver
│ └── Touch_GT911.h # Touch driver header
etc/, data/, backups/, logs/ # Additional project folders
For the JC4827W543C environment the build requires an extra include path and a few LVGL compile-time defines so that shared headers and Montserrat font objects are found during compilation and linking. If you edit platformio.ini manually, ensure the environment includes:
These flags are applied to the [env:JC4827W543C] build_flags in the project so the LVGL library builds the Montserrat font objects and enables logging. Without them you may see missing-header or undefined LVGL font / logging symbols at link time.
Key configuration constants in main.cpp:
uint8_t controllerMAC[] = {0xEC, 0xE3, 0x34, 0xC0, 0x33, 0xC0};Touch calibration and display pins are configured for JC4827W543C hardware.
- download_latest_code.bat: Pulls the latest code from both StepperGUI and MagLoop_Common_Files.
- upload_code_if_changed.bat: Checks for changes in both repositories and pushes updates only if changes are detected.
- Double-click or run
download_latest_code.batto update your local code from GitHub. - Double-click or run
upload_code_if_changed.batto push any local changes to GitHub. If there are no changes, the script will warn and do nothing.
These scripts automate the most common sync operations for development.
All position limiting and limit switch logic is now archived for reference. If you need the last version with limit switches, use the limit-switches-final git tag or branch.
- PlatformIO 6.1.18
This version uses the TCRT5000 Infrared Reflective Photoelectric Switch IR Tracking Sensor Module for end-stop detection. The sensor is used to reliably detect the physical limits of the stepper motor travel, providing accurate and safe position limiting.
Wiring and integration details:
- Connect the TCRT5000 sensor output to the designated end-stop input pin on the ESP32-S3.
- The firmware reads the sensor state to determine when the end-stop is reached and halts or reverses the motor as needed.
Refer to the schematic and code comments for further integration details.
