ShiboSoftwareDev/i-wan
This code defines a PCB and schematic for a microcontroller development board, incorporating various surface-mount components (resistors, capacitors, headers, connectors, crystals, and an IC), with detailed footprints, electrical nets, and routing instructions.
- Version
- 1.0.10
- License
- unset
- Stars
- 0
scripts/export-latest-kicad.mjs
import { readFile, writeFile } from "node:fs/promises"
import { CircuitJsonToKicadPcbConverter } from "circuit-json-to-kicad"
const inputPath = process.argv[2] ?? "dist/index/circuit.json"
const outputPath =
process.argv[3] ?? "fabrication/msp-exp430fr2433.kicad_pcb"
const circuitJson = JSON.parse(await readFile(inputPath, "utf8"))
const converter = new CircuitJsonToKicadPcbConverter(circuitJson, {
projectName: "msp-exp430fr2433",
})
converter.runUntilFinished()
await writeFile(outputPath, converter.getOutputString())
console.log(`Exported KiCad PCB to ${outputPath}`)