How ivnkarpenko/berdanka-test works
This repository implements an IMU-based orientation and target-status display, with TCP clients that can set a target angle and, on Windows, optionally derive target angles from camera detections. The main workflow is sensor orientation → quantized angles and target comparison → serial telemetry for Processing; client-supplied angles set the spawn reference. Source excerpts support the firmware and client behavior, while the Processing sketch’s implementation is not sampled.
Main entry points: main.cpp TCP server · windows_tcp_gui.py Windows GUI · jetson_tcp_gui.py Jetson GUI · yolo11n.pt YOLO model
Components 13
Arduino firmware
- Orientation controller
src/main.cpp - Angle processing
src/main.cpp - Spawn and target state
src/main.cpp - TCP server
src/main.cpp - Serial telemetry
src/main.cpp
TCP clients
- Windows GUI
tools/windows_tcp_gui.py - Jetson GUI
tools/jetson_tcp_gui.py
Camera vision
- Detection and angle conversion
tools/windows_tcp_gui.py - YOLO model
yolo11n.pt
Serial display
- Serial animation
processing/serial_animation/serial_animation.pde
Other components
- Operator
- ICM-20948 IMU
- Camera
Connections 17
- ICM-20948 IMU → Orientation controller: provides sensor data
- Orientation controller → Angle processing: reads orientation
- Angle processing → Spawn and target state: updates angles
- TCP server → Spawn and target state: sets spawn angles
- Orientation controller → TCP server: handles client traffic
- Windows GUI → TCP server: sends TCP packets
- TCP server → Windows GUI: returns ACK or error
- Jetson GUI → TCP server: sends TCP packets
- TCP server → Jetson GUI: returns ACK or error
- Camera → Detection and angle conversion: provides frames
- Windows GUI → Detection and angle conversion: controls detection
- YOLO model → Detection and angle conversion: supports detection
- Detection and angle conversion → TCP server: sends detected angles
- Spawn and target state → Serial telemetry: formats status
- Serial telemetry → Serial animation: streams telemetry
- Operator → Windows GUI: configures and monitors
- Operator → Jetson GUI: configures and sends