How tuanchris/dune-weaver works
Main Components
A. Frontend Layer:
• Web Interface (Browser-based UI)
• Static Assets (CSS, JS files in /static)
• HTML Templates (in /templates)
B. Backend Layer:
• Flask Web Server (app.py)
• Pattern Processing System
• Serial Communication Handler
C. Hardware Layer:
• Arduino Controller
• Motors & Drivers
• Physical Components (sand table, magnet, steel ball)
[Web Interface Layer]
• ↕
[Backend Server Layer]
• ↕
[Hardware Layer]
Component Details and Relationships
A. Web Interface Layer (Top):
• Static file serving (main.js, style.css)
• Template rendering (index.html)
B. Backend Server Layer (Middle):
• Key modules:
• Pattern Processor (handling .thr files)
• Serial Communication Manager
• File Management System
• Patterns directory with its contents
C. Hardware Layer (Bottom):
• Arduino Controller (show both variants: standard and TMC2209)
• Motor Control System
• Physical Table Components
Data Flow Indicators
• HTTP/WebSocket communications between frontend and backend
• Serial communication between backend and Arduino
• Physical control signals from Arduino to motors
• Pattern file processing flow
Additional Elements
• Notes about the theta-rho coordinate system
• Configuration flows for pre-execution actions
• Batch processing optimization
Technical Details
• Python/Flask backend
• Serial communication protocols
• Arduino firmware components
• Motor driver specifications (DRV8825/TMC2209)
• Pattern file format structure
Remember to indicate the asynchronous nature of the communication between components and the real-time aspects of the system, as this is crucial for the smooth operation of the sand table.