How enes-sen/arduino-virtual-duneweaver-test works
This is Arduino firmware for a DuneWeaver simulator: it accepts serial G0/G1 coordinate commands, interpolates Cartesian lines into polar motor positions, and drives two stepper axes. The main loop connects command listening and continued motor stepping. The README also identifies Wokwi virtual testing, but the sampled source does not show how the simulator is connected to the firmware, so that relationship is omitted.
Main entry points: MotorController.cpp Motor Controller · main.cpp Arduino Loop · GCodeParser.cpp G-code Parser · Kinematics.cpp Line Kinematics
Components 6
Command Input
- Arduino Loop
DuneWeaverSimTester/DuneWeaverSim/src/main.cpp - G-code Parser
DuneWeaverSimTester/DuneWeaverSim/src/GCodeParser.cpp
Motion Planning
- Line Kinematics
DuneWeaverSimTester/DuneWeaverSim/src/Kinematics.cpp
Motor Control
- Motor Controller
DuneWeaverSimTester/DuneWeaverSim/src/MotorController.cpp
Other components
- Serial Operator
- AccelStepper
Connections 8
- Serial Operator → Arduino Loop: sends commands
- Arduino Loop → G-code Parser: listens serial
- Arduino Loop → Motor Controller: runs axes
- G-code Parser → Line Kinematics: plans line
- G-code Parser → Serial Operator: prints status
- Line Kinematics → Motor Controller: sets steps
- Line Kinematics → Motor Controller: runs motion
- Motor Controller → AccelStepper: commands steppers