LED Tree
This project was created using the rotator.py module,
which was was designed to be scripted with KiCad 5's python console.
Place it in your KiCad data directory (%APPDATA/kicad
on Windows,
~/.config/kicad
on Linux, ~/Library/Preferences/kicad
on Mac) under
the scripting
folder. Then it can be imported as a module in the
console.
Here's the code I used to arrange the jumpers, resistors, and LEDs radially for this project:
import rotator
from pcbnew import wxPoint
# Origin is chosen arbitrarily - this will need to be
# adjusted depending on your project.
# I think all distances are in nanometers.
origin = wxPoint(100e6, 100e6)
base = 15e6
def tenth(n):
return n * 2.54e6
def doit():
# The jumper pads
rotator.rotateSequence("JP", 1, 16, base + tenth(5), origin, 0, 90)
# The resistors
rotator.rotateSequence("R", 1, 16, base + tenth(1), origin, 0, 90)
# The LEDs
rotator.rotateSequence("D", 1, 16, base, origin, 0, 270)
I just pasted it into the console. It only needed to work once so I didn't bother making it any easier.
Name | Size | SHA-256 hash |
---|---|---|
led-tree_gerbers.zip | 35.86 kB | 6cc2affb66b8bb23241f537d8e6b275ade190d67d0ceef14f6f6c0a9b3c8ca57 |
schematic.pdf | 86.21 kB | 82d9e9aea47a49828578973455037778d08a9b868f87c6492ae7713aaa8d7a2a |
rotator.py | 824 B | c9317dc19957cfac057ca050b2c535770f98bd41048c850cf86ef71337b0d0bc |