velxio/frontend/src/components/velxio-components
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
..
ArduinoMega.tsx
ArduinoNano.tsx
ArduinoUno.tsx
Attiny85.tsx
Attiny85Element.ts
Bmp280Element.ts
DiodeElements.ts
EPaper.tsx
EPaperElement.ts
Esp32.tsx
Esp32Element.ts fix(esp32): add GPIO 16/17 pin aliases on DevKit V1 (RX2/TX2) 2026-05-20 21:16:33 +02:00
FlipFlopElements.ts
IC74HC595.ts
LED.tsx
LogicGateElements.ts
LogicICElements.ts
MotorDriverElements.ts feat(motors): fix stepper rotation + add A4988 driver (real Fritzing SVG) 2026-05-31 16:28:34 -03:00
NanoRP2040.tsx
NeoPixel.tsx
OpAmpElements.ts
PiPicoW.tsx
PiPicoWElement.ts
Potentiometer.tsx
PowerElements.ts
Pushbutton.tsx
RaspberryPi3.tsx
RaspberryPi3Element.ts
RaspberryPi4.tsx feat(boards): expose Raspberry Pi 4 and Pi 5 in the picker (UI + pin wiring) 2026-05-23 04:46:59 +02:00
RaspberryPi4Element.ts feat: STM32 (Blue Pill / Black Pill) QEMU emulation + Pro board gating 2026-05-30 19:06:14 -03:00
RaspberryPi5.tsx feat(boards): expose Raspberry Pi 4 and Pi 5 in the picker (UI + pin wiring) 2026-05-23 04:46:59 +02:00
RaspberryPi5Element.ts feat: STM32 (Blue Pill / Black Pill) QEMU emulation + Pro board gating 2026-05-30 19:06:14 -03:00
RelayElements.ts
Resistor.tsx
RiscVBoard.tsx
Stm32BluePill.tsx feat(boards): add 6 STM32 boards (F4 Discovery, Olimex H405, Netduino 2/+2, Pill variants) 2026-05-31 03:19:26 -03:00
Stm32BluePillElement.ts fix(stm32): make Stm32BluePillElement import-safe in node (vitest) 2026-05-31 08:33:55 +02:00
TransistorElements.ts
pi40PinHeader.ts feat(boards): expose Raspberry Pi 4 and Pi 5 in the picker (UI + pin wiring) 2026-05-23 04:46:59 +02:00