How benjaalonso357-dot/campera-calefactor works
This is ESP32 firmware for a four-zone heated jacket. The intended workflow is to read four LM35 sensors, compare measurements with target temperatures, and switch the corresponding MOSFET heaters; users set targets with buttons, BLE, or serial, and can inspect zone status. Targets are persisted in EEPROM, and a long press enters deep sleep. The main sketch and sensor/state implementations were not excerpted, so orchestration and some data-flow links are left unverified rather than inferred as confirmed calls.
Main entry points: campera-calefactor.ino Setup and loop · comandos.cpp Command processing · botones.cpp Button handling · estado.cpp Shared zone state
Components 17
User controls
- Button handling
botones.cpp - Command processing
comandos.cpp - BLE service
bluetooth.cpp
Thermal control
- Temperature sensing
sensores.cpp - Heater control
calefactores.cpp
State and persistence
- Shared zone state
estado.cpp - Target persistence
memoria.cpp
Firmware platform
- Setup and loop
campera-calefactor.ino - Pin and limits config
configuracion.h - Sleep and wake
energia.cpp
Other components
- Jacket user
- BLE phone
- Serial monitor
- Physical buttons
- Four LM35 sensors
- Heater MOSFETs
- EEPROM
Connections 23
- Jacket user → Physical buttons: presses
README.md - Physical buttons → Button handling: reads presses
- Button handling → Sleep and wake: sleeps on hold
botones.cpp - Button handling → Shared zone state: sets targets
- BLE phone → BLE service: sends commands
README.md - BLE service → Command processing: dispatches
bluetooth.cpp - BLE service → BLE phone: notifies zones
bluetooth.cpp - Serial monitor → Command processing: sends commands
README.md - Command processing → Shared zone state: sets targets
comandos.cpp - Command processing → Heater control: checks heating
comandos.cpp - Command processing → Serial monitor: prints status
comandos.cpp - Four LM35 sensors → Temperature sensing: provides readings
README.md - Temperature sensing → Shared zone state: updates measurements
- Shared zone state → Heater control: supplies temperatures
calefactores.cpp - Heater control → Heater MOSFETs: switches zones
README.md - Shared zone state → Target persistence: provides targets
memoria.cpp - Target persistence → EEPROM: reads and writes
memoria.cpp - Setup and loop → Temperature sensing: orchestrates
- Setup and loop → Heater control: orchestrates
- Setup and loop → Button handling: orchestrates
- Setup and loop → BLE service: orchestrates
- Setup and loop → Target persistence: orchestrates
- Pin and limits config → Button handling: configures pins