How messengergp/ultrasonic_radar works
This is interrupt-driven embedded firmware for a TM4C1294 ultrasonic radar. Button or UART commands select IDLE, AUTO, or MANUAL behavior; the radar controller positions an SG90 servo, triggers ultrasonic ranging, and reports readings through UART and the LCD sonar map, with buzzer feedback for modes and errors. The graph preserves the documented ADC, joystick, timer-capture, and SysTick roles. Edges cite shown calls or README-described capabilities; unsampled subsystem links are dashed where implementation wiring is not shown.
Main entry points: RADAR.c Auto and manual sweep · main.c Main loop · LCD.c LCD and sonar display · ULTRASONIC.c Ultrasonic ranging
Components 18
Inputs and commands
- UART terminal
- Joystick shield
- GPIO button input
project EmbdSys/CONTROLLER.c
Radar control
- Main loop
project EmbdSys/main.c - Mode and bounds
project EmbdSys/RADAR.c - Auto and manual sweep
project EmbdSys/RADAR.c
Hardware peripherals
- Pot and joystick ADC
project EmbdSys/POT.c - Servo PWM
project EmbdSys/SERVO.c - Ultrasonic ranging
project EmbdSys/ULTRASONIC.c - UART interface
project EmbdSys/UART.c
User feedback
- LCD and sonar display
project EmbdSys/LCD.c - ILI9341 and SPI driver
project EmbdSys/LCD_Display.h - Buzzer feedback
project EmbdSys/BUZZER.c - Embedded image asset
project EmbdSys/Claude outputs/JOEB.c
Board runtime
- SysTick timebase
project EmbdSys/TICK.c - Shared runtime state
project EmbdSys/GLOBALS.c - TM4C1294 support
project EmbdSys/ES.h
Other components
- Operator
Connections 29
- Operator → UART terminal: enters commands
README.md - Operator → Joystick shield: presses controls
README.md - Joystick shield → GPIO button input: signals buttons
README.md - GPIO button input → Main loop: sets command
project EmbdSys/CONTROLLER.c - GPIO button input → UART interface: sends key
project EmbdSys/CONTROLLER.c - UART terminal → UART interface: sends commands
README.md - Main loop → Mode and bounds: changes mode
project EmbdSys/main.c - Main loop → Ultrasonic ranging: requests echo
project EmbdSys/main.c - Main loop → LCD and sonar display: updates display
project EmbdSys/main.c - Main loop → Buzzer feedback: signals idle
project EmbdSys/main.c - Main loop → UART interface: prints status
project EmbdSys/main.c - Mode and bounds → LCD and sonar display: reports errors
project EmbdSys/RADAR.c - Mode and bounds → Buzzer feedback: signals mode
project EmbdSys/RADAR.c - Main loop → Auto and manual sweep: runs selected mode
project EmbdSys/main.c - Auto and manual sweep → Pot and joystick ADC: reads aim input
README.md - Auto and manual sweep → Servo PWM: sets angle
project EmbdSys/RADAR.c - Auto and manual sweep → Ultrasonic ranging: triggers ranging
project EmbdSys/RADAR.c - Auto and manual sweep → LCD and sonar display: renders live data
project EmbdSys/RADAR.c - Auto and manual sweep → UART interface: prints readings
project EmbdSys/RADAR.c - Auto and manual sweep → Buzzer feedback: signals sweep limits
project EmbdSys/RADAR.c - LCD and sonar display → Ultrasonic ranging: reads distance
project EmbdSys/LCD.c - LCD and sonar display → Servo PWM: gets angle
- LCD and sonar display → ILI9341 and SPI driver: draws graphics
project EmbdSys/LCD.c - LCD and sonar display → Buzzer feedback: sounds errors
project EmbdSys/LCD.c - SysTick timebase → Shared runtime state: updates time
- Auto and manual sweep → SysTick timebase: uses elapsed time
README.md - Ultrasonic ranging → SysTick timebase: uses timer capture
README.md - TM4C1294 support → Main loop: provides startup
project EmbdSys/main.c - Embedded image asset → LCD and sonar display: supplies image data