rushabhcodes/simple-usb-c-pd-peltier-driver
Reference-based four-layer USB-C PD Peltier driver with RP2040 control, adjustable voltage/current limits, fan power and temperature probes.
- Version
- 0.3.1
- License
- MIT
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone rushabhcodes/simple-usb-c-pd-peltier-driver # download the package files into ./simple-usb-c-pd-peltier-driver
tsci add rushabhcodes/simple-usb-c-pd-peltier-driver # add it to your project as @tsci/rushabhcodes.simple-usb-c-pd-peltier-driverIn a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
designs/floorplan.ts
import type { AnyCircuitElement } from "circuit-json"
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg"
import type { DraftBoardId } from "./boards"
export function floorplanSvg(json: AnyCircuitElement[], id: DraftBoardId, routed = false) {
const pcb = convertCircuitJsonToPcbSvg(json, { width: 1200, height: 900 })
return `<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="952" viewBox="0 0 1200 952">
<rect width="1200" height="52" fill="#fff4d6"/>
<text x="24" y="34" font-family="sans-serif" font-size="22" fill="#6b3100">${id.toUpperCase()} — ${routed ? "ROUTED REVIEW CANDIDATE" : "UNROUTED PLACEMENT STUDY"} — NOT FOR FABRICATION</text>
${pcb.replace("<svg", '<svg y="52"')}
</svg>`
}