How longgang/stm32_mqtt_onenet_esp8266_freertos-main works
This is STM32F103 firmware for an indoor security system. The documented workflow monitors smoke, temperature/humidity, light, and occupancy; evaluates security/alarm conditions; and presents readings locally and to an ESP8266-connected host. The README also describes owner-controlled arming and audible/LED alarms. Firmware entry-point and driver call paths were not sampled, so relationships beyond the documented capabilities are shown as unverified; the graph does not assert a specific task or message flow.
Main entry points: control.c Security control · main.c Firmware entry · adc.c Smoke sensing · lcd.c LCD status
Components 18
Sensors
- Occupancy sensing
HARDWARE/scr/control.c - Smoke sensing
HARDWARE/scr/adc.c - Temperature and humidity
HARDWARE/scr/dht11.c - Light sensing
HARDWARE/scr/bh1750.c
Security and alarms
- Security control
HARDWARE/scr/control.c - LED and buzzer
HARDWARE/scr/led.c - Buzzer driver
HARDWARE/BEEP/BEEP.c
Displays and network
- LCD status
HARDWARE/scr/lcd.c - ESP8266 link
HARDWARE/scr/wifi.c - MQTT reporting
HARDWARE/scr/mqtt.c
Firmware runtime
- Firmware entry
USER/main.c - Task scheduler
FreeRTOS/tasks.c - Queues and sync
FreeRTOS/queue.c - Software timers
FreeRTOS/timers.c - ADC peripheral
STLIB/src/stm32f10x_adc.c - Timer peripheral
STLIB/src/stm32f10x_tim.c
Other components
- Homeowner
- Host interface
Connections 22
- Occupancy sensing → Security control: informs
- Smoke sensing → Security control: informs
- Light sensing → Security control: informs
- Temperature and humidity → LCD status: displayed on
- Smoke sensing → LCD status: displayed on
- Light sensing → LCD status: displayed on
- Occupancy sensing → LCD status: displayed on
- Security control → LED and buzzer: triggers
- Security control → Buzzer driver: triggers
- Security control → MQTT reporting: reports status
- MQTT reporting → ESP8266 link: uses link
- ESP8266 link → Host interface: sends updates
- Homeowner → Host interface: controls arming
- Homeowner → Security control: arms system
- Firmware entry → Task scheduler: starts runtime
- Firmware entry → Occupancy sensing: uses
- Firmware entry → Smoke sensing: uses
- Firmware entry → Temperature and humidity: uses
- Firmware entry → Light sensing: uses
- Smoke sensing → ADC peripheral: reads ADC
- Task scheduler → Queues and sync: coordinates via
- Task scheduler → Software timers: uses timers