Source code for circuitsnippets.com.
It turns out that kicad uses the OS clipboard for all clipboard operations. It's incredibly nice, and means you can seamlessly paste between two kicads that are running, or save snippets of a schematic or layout into a text file.
It also means that you can make a website that puts snippets of kicad schematic directly into your clipboard, which you can then paste directly into kicad. It's always so annoying to me to make buck converters, so I made circuitsnippets.com, which lets you pick a buck part and a target voltage, and it generates a schematic snippet that's 100% populated with footprints and LCSC part numbers.
Note that right now there might be an issue where it only works to paste into kicad 9. If the circuit snippet pastes as text (rather than schematic), as shown below, please let me know what kicad version you're in!
To run this you just need to do:
npm install
npm run devAnd then navigate to localhost.
To make a new part you just need to:
- Make a new directory in
templates/ - Create a new kicad project in the new directory.
- Create
Widget.tsxfile in the new directory, which exports a variable calleddeviceInfoYourPartNameof typeDeviceInfo. - In
src/App.tsxmake four changes: a. Add an import for yourWidget.tsx, b. extendDEVICE_LIST, c. extenddeviceInfoTable, d. and add a<DeviceButton>in the appropriate section for your category of device.
Everything here is CC0/public domain. You may do anything you want with any of it.
