Grafito CANStepper

The production node firmware is GrafitoCANStepper_C3 (Arduino / ESP32-C3, GCSP v1). Use this page to download the sketch or preview the full source. The file is hosted on this docs site (no private repository access required).

Download & full source preview

Download GrafitoCANStepper_C3.inoOpen raw file

ESP32-C3 GCSP firmware (fw ≥1.4 includes TMC OTPW/OT diagnostics).

GrafitoCANStepper_C3.inoscroll to preview full source
// Loading firmware preview…

What this sketch provides

AreaNotes
MotionOpen-loop FastAccelStepper; closed-loop trap + v_ff (fw ≥1.2)
DriverTMC2209 over UART; OTPW/OT, shorts, StallGuard (fw ≥1.4)
EncoderMT6701 SSI, multi-turn angle
BusTWAI CAN 1 Mbps, USB serial bridge
SafetyE-stop latch, fault codes, bus-off recovery

Flash with Arduino IDE or arduino-cli (ESP32C3 Dev Module, USB CDC On Boot: Enabled). Libraries: FastAccelStepper, TMC2209 (janelia-arduino).

Power for programming: apply the main 5–24 V rail (typically 24 V) before upload. USB-C is data only — it does not power the ESP32 for programming. See Hardware → Power.

arduino-cli compile --fqbn esp32:esp32:esp32c3:CDCOnBoot=cdc \
  path/to/GrafitoCANStepper_C3
arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:esp32c3:CDCOnBoot=cdc \
  path/to/GrafitoCANStepper_C3

After flash, the serial banner should show fw 1.4 (or newer) for full TMC diagnostics (fw 1.7 includes HOME raw diagnostics). Host API: node.get_driver_status() — see Python library and Protocol DRIVER.

Optional: Wi‑Fi SoftAP test portal

For a phone browser bench UI (SoftAP hotspot + enable/move/endstop), see Wi‑Fi test portal. That sketch is separate and overwrites production GCSP until you re-flash GrafitoCANStepper_C3.

On this page