How doudar/smartspin2k works
Main Components Identification
a. Hardware Layer:
• Physical Components (PCB, Case, Mechanical Parts)
• Stepper Motor System
• Resistance Control Mechanism
• Bike Mount Interface
• Shifter Controls
b. Firmware/Software Layer:
• ESP32 Microcontroller Core
• BLE Services (Multiple services identified in /include/BLE_*)
• Web Server Components
• Sensor Collection System
• ERG Mode Controller
c. Communication Interfaces:
• Bluetooth Low Energy (BLE)
• WiFi Connectivity
• HTTP/WebSocket Services
• UDP Communication
[User Interface Layer]
• Mobile App Interface
• Web Interface (data/*.html files)
• Physical Controls (Shifters)
[Application Layer]
• BLE Services Manager
• HTTP Server
• WebSocket Server
• ERG Mode Controller
• Sensor Collector
[Hardware Control Layer]
• Motor Controller
• Sensor Interfaces
• Power Management
• Physical Feedback Systems
[Physical Layer]
• PCB Components
• Mechanical Assembly
• Bike Integration
Key Relationships
• Data flow between BLE services and external apps (Zwift, TrainerRoad)
• Sensor data collection and processing pipeline
• Control signals from user inputs to motor actions
• Power and feedback loops in the ERG mode system
Implementation Details
• The modular nature of the BLE services (/include/BLE_*)
• The web interface components (/data/*.html)
• The sensor collection system (SensorCollector.cpp)
• The physical integration with various bike models (Hardware/Common Assets)
Documentation Elements
Include:
• Version information
• Key component specifications
• Interface descriptions
• Power requirements
Remember to include notes about the different hardware versions (V1-V3) and their specific characteristics, as the project has evolved through multiple iterations.