🤖programmatically 💥create 🛰️hardware
ts
import { Component, PCB } from '@typecad/typecad'
import { Resistor, LED } from '@typecad/passives/0805'
let typecad = new PCB('typecad');
let bt1 = new Component({ footprint: 'Battery:BatteryHolder_Keystone_500' });
let r1 = new Resistor({ value: '1 kOhm' });
let d1 = new LED();
typecad.named('vin').net(bt1.pin(1), r1.pin(1));
typecad.net(r1.pin(2), d1.pin(2));
typecad.named('gnd').net(d1.pin(1), bt1.pin(2));
typecad.create(r1, d1, bt1);
`
_...is the same as this schematic._
!simple circuit
>The difference is that code can be copied, turned into reusable packages, version controlled, and used within the npm/Node.js system.
Get started
Read through the documentation for a full walkthrough:
`bash
npx @typecad/create-typecad
``