ShiboSoftwareDev/nema8-20mm-dual-usbc-stepper-controller

A compact 4-layer USB‑C PD/data controller board using a CH32X035 MCU and TMC2209 driver to power and control a NEMA‑8 stepper motor, with 3.3‑V regulation, USB ESD/reverse-polarity/TVS protection, current sensing, and boot control.

Version
1.0.12
License
unset
Stars
0

scripts/probe-repairs.mjs

import fs from "node:fs"
import { runAllRoutingChecks } from "@tscircuit/checks"

let circuit = JSON.parse(fs.readFileSync("dist/index/circuit.json", "utf8"))
  .filter((element) => !String(element.type).endsWith("error"))

circuit = circuit.map((element) => {
  if (element.type !== "pcb_trace" || element.pcb_trace_id !== "source_net_16_mst1_0") return element
  return { ...element, route: element.route.map((point, index) =>
    index >= 4 && index <= 6 && point.route_type === "wire"
      ? { ...point, x: point.x - 0.15, y: point.y + 0.1, width: 0.1 }
      : point) }
})

const errors = await runAllRoutingChecks(circuit)
console.log(errors.length)
console.log(errors.map((error) => error.message).join("\n"))