velxio/frontend/src/simulation
David Montero Crespo 0d5a1d5838 feat(motors): fix stepper rotation + add A4988 driver (real Fritzing SVG)
The stepper-motor and biaxial-stepper parts only decoded a one-hot wave-drive coil sequence, so they never rotated under the common two-phase full-step / Stepper.h / AccelStepper drive that Wokwi's own examples use -- only the servo moved. Rewrote both decoders to track the net magnetic-field vector of the coils (atan2 of the H-bridge currents), so the rotor follows wave, two-phase full-step and half-step drive alike, whether driven directly from GPIO or through a driver's outputs.

Also adds an A4988 STEP/DIR stepper driver (parity with Wokwi's wokwi-a4988): velxio-a4988 element renders the real Pololu A4988 Fritzing breadboard SVG (public/components/a4988.svg); MotorDriverParts.ts finds the wired stepper via the netlist and advances it one (micro)step per STEP rising edge in the DIR direction (MS1-3 microstep + active-low ENABLE). Metadata in component-overrides.json. Three examples (Uno/ESP32/Pico) wire MCU STEP/DIR -> A4988 -> stepper, coil map aligned to Wokwi (1A->B+,1B->B-,2A->A+,2B->A-).

Verified in-browser: motor rotates on Arduino Uno (avr8js) and Raspberry Pi Pico (rp2040js). tsc --noEmit clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 16:28:34 -03:00
..
customChips feat(attiny85+customchip): full ATtiny85 ADC/Timer0 + custom-chip pipeline fixes 2026-05-19 18:10:08 -03:00
cyw43
…
displays
…
parts feat(motors): fix stepper rotation + add A4988 driver (real Fritzing SVG) 2026-05-31 16:28:34 -03:00
spice feat(boards): expose Raspberry Pi 4 and Pi 5 in the picker (UI + pin wiring) 2026-05-23 04:46:59 +02:00
verify
…
AVRSimulator.ts fix(multi-board): initSimulator wiped Interconnect's UART wrapper 2026-05-26 17:08:04 +02:00
Esp32Bridge.ts fix(epaper/esp32): preserve PartSimulationRegistry sensors in setSensors + correct BUSY polarity per controller family 2026-05-22 23:32:33 +02:00
Esp32C3Simulator.ts fix(spice+pipeline): LED visualization, INPUT_PULLUP, ESP32-C3, PWM fade, examples 2026-05-18 21:52:07 -03:00
Esp32MicroPythonLoader.ts
…
HD44780Decoder.ts
…
I2CBusManager.ts
…
Interconnect.ts feat: STM32 (Blue Pill / Black Pill) QEMU emulation + Pro board gating 2026-05-30 19:06:14 -03:00
LogicFamilies.ts
…
MicroPythonLoader.ts
…
PinManager.ts fix(stop): reset CPU to PC=0 on Stop (real-life power-cycle semantics) 2026-05-26 21:28:41 +02:00
PinResolver.ts
…
RP2040Simulator.ts feat(rp2040/uart): synthesize bit-level TX waveform on GP0 / GP4 2026-05-22 19:54:55 +02:00
RaspberryPi3Bridge.ts
…
RiscVCore.ts
…
RiscVSimulator.ts fix(spice+pipeline): LED visualization, INPUT_PULLUP, ESP32-C3, PWM fade, examples 2026-05-18 21:52:07 -03:00
SensorUpdateRegistry.ts
…
SignalRouter.ts
…
SpiBus.ts
…
Stm32Bridge.ts feat: STM32 (Blue Pill / Black Pill) QEMU emulation + Pro board gating 2026-05-30 19:06:14 -03:00
esp32-signals.ts
…
piSlaveScanner.ts
…
rp2040-bootrom.ts
…
sensorControlConfig.ts
…