Add initial Ergogen config and footprints

This commit is contained in:
Lexi / Zoe 2024-06-06 20:15:18 +02:00
parent 07c3e0e727
commit ec2c208ccc
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
6 changed files with 582 additions and 0 deletions

211
ergogen/config.yaml Normal file
View File

@ -0,0 +1,211 @@
# Ergogen config for the protoEepyBoard
#
# Reference information:
# - Keycap size (FK MBK keycaps): 17.5mm x 16.5mm
# Metadata
meta:
# Required version of Ergogen
engine: "4.1.0"
# Version of the board
version: "1.0"
author: binaryDiv
# Define units and default values used throughout this file
units:
# Redefine choc units (keycap size + 1mm clearance)
cx: 18.5
cy: 17.5
# Size of key rectangle in demo view (keycap size)
$default_width: cx-1
$default_height: cy-1
# Actual spacing of keys
$default_spread: cx
$default_padding: cy
# Define the points (i.e. keys)
points:
key:
# Tag all points as "is_key" unless overwritten
tags: [ is_key ]
zones:
# Primary keyboard zone
primary:
# Set anchor to fix placement on KiCad sheet
anchor:
shift: [ 100, -150 ]
# Key rows (from bottom to top)
rows:
# Modifier row (Ctrl, ..., but excluding the thumb keys)
mod:
# Bottom letter row (Shift, Backspace, ZXCV...)
bottom:
# Middle letter row (Esc, ASDFG...)
home:
# Top letter row (Tab, QWERT...)
top:
# Number row (`, 12345...)
num:
# Key columns (from left to right)
columns:
# Left-most column (`, Tab, Esc, Shift, Ctrl)
outer:
key.stagger: 0.25cy
# First letter column (1, QA, ...)
one:
key.stagger: 0.25cy
# Second letter column (2, WSZ)
two:
rows.mod.skip: true
# Third letter column (3, EDX)
three:
rows.mod.skip: true
# Fourth letter column (4, RFC)
four:
rows.mod.skip: true
key.stagger: -0.25cy
# Fifth letter column (5, TGV)
five:
rows.mod.skip: true
key.stagger: -0.25cy
# Thumb fan
thumb:
# Position thumb keys based on the (non-existant) third key in the modifier row
anchor:
ref: primary_three_mod
shift: [ -0.5cx, -0.25cy ]
# Rotate the thumb keys around the bottom-left corner of the key
key:
origin: [ -0.5cx, -0.5cy ]
splay: -8
# Define thumb keys
columns:
one:
two:
three:
four:
# Generate outlines that can be used in the PCB and for 3D models
outlines:
# Outline of the key caps
keys:
- what: rectangle
where: is_key
size: [ cx-1, cy-1 ]
# Outline for the PCB
board:
- what: polygon
points:
- ref: primary_outer_num
shift: [ -0.5cx, 0.75cy ]
- ref: primary_five_num
shift: [ 1.5cx + 0, 1.0cy ]
- ref: primary_five_num
shift: [ 1.5cx + 0, 1.0cy - 32 ]
- ref: thumb_four
shift: [ 0.5cx, 0.5cy ]
- ref: thumb_four
shift: [ 0.5cx, -0.5cy ]
- ref: primary_outer_mod
shift: [ -0.5cx, -0.5cy ]
expand: 4
# Preview version of board with key caps and components for visualization
board_preview:
- board
- ^keys
# Pro Micro board - TODO: position?
- what: rectangle
operation: stack
where: primary_five_num
size: [ 18, 32 ]
adjust.shift: [ cx + 2, 0.25cy ]
# Cutouts for the switches
switch_cutouts:
- what: rectangle
where: is_key
size: 14
# Board outline with switch cutouts
switch_plate:
- board
- -switch_cutouts
# Generate the PCB
pcbs:
protoeepyboard:
outlines:
main:
outline: board
footprints:
choc_hotswap:
what: choc_pretty
where: is_key
# Rotate footprint so that the hotswap socket is at the bottom and the LED can be at the top
adjust.rotate: 180
params:
keycaps: true
reverse: true
hotswap: true
from: "{{colrow}}"
to: "{{row_net}}"
diode:
what: diode_smd
where: is_key
adjust:
shift: [ 0, 4.7 ]
rotate: 180
params:
side: B
from: "{{colrow}}"
to: "{{column_net}}"
controller:
what: promicro_modified
where:
ref: primary_five_num
rotate: -90
shift: [ cx + 2, cy - 14 ]
params:
orientation: up
# TODO: Place reset button
# reset_button:
# what: button_6x6
# where:
# # TODO: Where?
# ref: pad_four_five
# shift: [ 0, 15 ]
# params:
# side: B
# from: GND
# to: RST
# Mounting holes
# TODO: Place these
# mounting_hole_top_left:
# what: mountinghole_m2
# where:
# ref: pad_one_five
# shift: [ -8, 15 ]
# TODO: Route all unused pins (+ VCC and GND) to a pin header on the board for potential future use
# TODO: Buy fitting pin sockets and/or pin headers :/

View File

@ -0,0 +1,48 @@
// Tactile button 6x6mm
// Source: https://kicad.github.io/footprints/Button_Switch_SMD
module.exports = {
params: {
designator: 'B',
side: 'F',
from: undefined,
to: undefined
},
body: p => `
(module SW_Push_1P1T_NO_6x6mm_H9.5mm (layer F.Cu) (tedit 5CA1CA7F)
(descr "tactile push button, 6x6mm e.g. PTS645xx series, height=9.5mm")
(tags "tact sw push 6mm smd")
(attr smd)
${p.at /* parametric position */}
${'' /* footprint reference */}
(fp_text reference "${p.ref}" (at 0 -4.05) (layer F.SilkS) ${p.ref_hide} (effects (font (size 1 1) (thickness 0.15))))
(fp_text value "" (at 0 4.15) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))))
${'' /* outline */}
(fp_line (start -3 -3 ) (end -3 3 ) (layer ${p.side}.Fab) (width 0.1))
(fp_line (start -3 3 ) (end 3 3 ) (layer ${p.side}.Fab) (width 0.1))
(fp_line (start 3 3 ) (end 3 -3 ) (layer ${p.side}.Fab) (width 0.1))
(fp_line (start 3 -3 ) (end -3 -3 ) (layer ${p.side}.Fab) (width 0.1))
(fp_line (start 5 3.25) (end 5 -3.25) (layer ${p.side}.CrtYd) (width 0.05))
(fp_line (start -5 -3.25) (end -5 3.25) (layer ${p.side}.CrtYd) (width 0.05))
(fp_line (start -5 3.25) (end 5 3.25) (layer ${p.side}.CrtYd) (width 0.05))
(fp_line (start -5 -3.25) (end 5 -3.25) (layer ${p.side}.CrtYd) (width 0.05))
(fp_line (start 3.23 -3.23) (end 3.23 -3.2 ) (layer ${p.side}.SilkS) (width 0.12))
(fp_line (start 3.23 3.23) (end 3.23 3.2 ) (layer ${p.side}.SilkS) (width 0.12))
(fp_line (start -3.23 3.23) (end -3.23 3.2 ) (layer ${p.side}.SilkS) (width 0.12))
(fp_line (start -3.23 -3.2 ) (end -3.23 -3.23) (layer ${p.side}.SilkS) (width 0.12))
(fp_line (start 3.23 -1.3 ) (end 3.23 1.3 ) (layer ${p.side}.SilkS) (width 0.12))
(fp_line (start -3.23 -3.23) (end 3.23 -3.23) (layer ${p.side}.SilkS) (width 0.12))
(fp_line (start -3.23 -1.3 ) (end -3.23 1.3 ) (layer ${p.side}.SilkS) (width 0.12))
(fp_line (start -3.23 3.23) (end 3.23 3.23) (layer ${p.side}.SilkS) (width 0.12))
(fp_circle (center 0 0) (end 1.75 -0.05) (layer ${p.side}.Fab) (width 0.1))
${'' /* pins */}
(pad 1 smd rect (at -3.975 -2.25 ${p.r}) (size 1.55 1.3) (layers ${p.side}.Cu ${p.side}.Paste ${p.side}.Mask) ${p.from})
(pad 1 smd rect (at 3.975 -2.25 ${p.r}) (size 1.55 1.3) (layers ${p.side}.Cu ${p.side}.Paste ${p.side}.Mask) ${p.from})
(pad 2 smd rect (at -3.975 2.25 ${p.r}) (size 1.55 1.3) (layers ${p.side}.Cu ${p.side}.Paste ${p.side}.Mask) ${p.to})
(pad 2 smd rect (at 3.975 2.25 ${p.r}) (size 1.55 1.3) (layers ${p.side}.Cu ${p.side}.Paste ${p.side}.Mask) ${p.to})
)
`
}

View File

@ -0,0 +1,133 @@
// Modified version of choc.js
// Source for modifications: https://github.com/daprice/keyswitches.pretty/blob/master/Kailh_socket_PG1350.kicad_mod
// ---------------------------
// Kailh Choc PG1350
// Nets
// from: corresponds to pin 1
// to: corresponds to pin 2
// Params
// hotswap: default is false
// if true, will include holes and pads for Kailh choc hotswap sockets
// reverse: default is false
// if true, will flip the footprint such that the pcb can be reversible
// keycaps: default is false
// if true, will add choc sized keycap box around the footprint
//
// note: hotswap and reverse can be used simultaneously
module.exports = {
params: {
designator: 'S',
hotswap: false,
reverse: false,
keycaps: false,
from: undefined,
to: undefined,
},
body: p => {
const standard = `
(module PG1350 (layer F.Cu) (tedit 5DD50112)
${p.at /* parametric position */}
${'' /* footprint reference */}
(fp_text reference "${p.ref}" (at 0 0) (layer F.SilkS) ${p.ref_hide} (effects (font (size 1.27 1.27) (thickness 0.15))))
(fp_text value "" (at 0 0) (layer F.SilkS) hide (effects (font (size 1.27 1.27) (thickness 0.15))))
${'' /* switch marks */}
(fp_line (start -7 -7) (end 7 -7) (layer F.SilkS) (width 0.15))
(fp_line (start 7 -7) (end 7 7) (layer F.SilkS) (width 0.15))
(fp_line (start 7 7) (end -7 7) (layer F.SilkS) (width 0.15))
(fp_line (start -7 7) (end -7 -7) (layer F.SilkS) (width 0.15))
${'' /* LED hole marks */}
(fp_line (start -2.6 3.1) (end 2.6 3.1) (layer Dwgs.User) (width 0.15))
(fp_line (start 2.6 3.1) (end 2.6 6.3) (layer Dwgs.User) (width 0.15))
(fp_line (start 2.6 6.3) (end -2.6 6.3) (layer Dwgs.User) (width 0.15))
(fp_line (start -2.6 3.1) (end -2.6 6.3) (layer Dwgs.User) (width 0.15))
${'' /* middle shaft */}
(pad "" np_thru_hole circle (at 0 0) (size 3.429 3.429) (drill 3.429) (layers *.Cu *.Mask))
${'' /* stabilizers */}
(pad "" np_thru_hole circle (at 5.5 0) (size 1.7018 1.7018) (drill 1.7018) (layers *.Cu *.Mask))
(pad "" np_thru_hole circle (at -5.5 0) (size 1.7018 1.7018) (drill 1.7018) (layers *.Cu *.Mask))
`
const keycap = `
${'' /* keycap marks */}
(fp_line (start -9 -8.5) (end 9 -8.5) (layer Dwgs.User) (width 0.15))
(fp_line (start 9 -8.5) (end 9 8.5) (layer Dwgs.User) (width 0.15))
(fp_line (start 9 8.5) (end -9 8.5) (layer Dwgs.User) (width 0.15))
(fp_line (start -9 8.5) (end -9 -8.5) (layer Dwgs.User) (width 0.15))
`
function pins(def_neg, def_pos, def_side) {
if (p.hotswap) {
return `
${'' /* hotswap socket marks */}
(fp_line (start 7 -5.6) (end 7 -6.2) (layer B.SilkS) (width 0.15))
(fp_line (start -1.5 -3.7) (end 1 -3.7) (layer B.SilkS) (width 0.15))
(fp_arc (start 1 -2.2) (end 2.5 -2.2) (angle -90) (layer B.SilkS) (width 0.15))
(fp_line (start 1.5 -8.2) (end 2 -7.7) (layer B.SilkS) (width 0.15))
(fp_line (start 2 -6.7) (end 2 -7.7) (layer B.SilkS) (width 0.15))
(fp_line (start 7 -6.2) (end 2.5 -6.2) (layer B.SilkS) (width 0.15))
(fp_line (start -2 -4.2) (end -1.5 -3.7) (layer B.SilkS) (width 0.15))
(fp_line (start -2 -7.7) (end -1.5 -8.2) (layer B.SilkS) (width 0.15))
(fp_line (start -1.5 -8.2) (end 1.5 -8.2) (layer B.SilkS) (width 0.15))
(fp_arc (start 2.5 -6.7) (end 2 -6.7) (angle -90) (layer B.SilkS) (width 0.15))
(fp_line (start 2.5 -2.2) (end 2.5 -1.5) (layer B.SilkS) (width 0.15))
(fp_line (start 2.5 -1.5) (end 7 -1.5) (layer B.SilkS) (width 0.15))
(fp_line (start 7 -1.5) (end 7 -2 ) (layer B.SilkS) (width 0.15))
(fp_arc (start 2.5 -6.7 ) (end 2 -6.7 ) (angle -90) (layer B.Fab) (width 0.15))
(fp_line (start -1.5 -8.2 ) (end 1.5 -8.2 ) (layer B.Fab) (width 0.15))
(fp_line (start -2 -7.7 ) (end -1.5 -8.2 ) (layer B.Fab) (width 0.15))
(fp_line (start -1.5 -3.7 ) (end 1 -3.7 ) (layer B.Fab) (width 0.15))
(fp_line (start -2 -4.2 ) (end -1.5 -3.7 ) (layer B.Fab) (width 0.15))
(fp_line (start 7 -6.2 ) (end 2.5 -6.2 ) (layer B.Fab) (width 0.15))
(fp_line (start 2 -6.7 ) (end 2 -7.7 ) (layer B.Fab) (width 0.15))
(fp_line (start 1.5 -8.2 ) (end 2 -7.7 ) (layer B.Fab) (width 0.15))
(fp_arc (start 1 -2.2 ) (end 2.5 -2.2 ) (angle -90) (layer B.Fab) (width 0.15))
(fp_line (start 2.5 -1.5 ) (end 7 -1.5 ) (layer B.Fab) (width 0.15))
(fp_line (start 2.5 -2.2 ) (end 2.5 -1.5 ) (layer B.Fab) (width 0.15))
(fp_line (start -2 -4.25) (end -2 -7.7 ) (layer B.Fab) (width 0.12))
(fp_line (start 7 -1.5 ) (end 7 -6.2 ) (layer B.Fab) (width 0.12))
(fp_line (start 7 -5 ) (end 9.5 -5 ) (layer B.Fab) (width 0.12))
(fp_line (start 9.5 -5 ) (end 9.5 -2.5 ) (layer B.Fab) (width 0.12))
(fp_line (start 9.5 -2.5 ) (end 7 -2.5 ) (layer B.Fab) (width 0.12))
(fp_line (start -2 -4.75) (end -4.5 -4.75) (layer B.Fab) (width 0.12))
(fp_line (start -4.5 -4.75) (end -4.5 -7.25) (layer B.Fab) (width 0.12))
(fp_line (start -4.5 -7.25) (end -2 -7.25) (layer B.Fab) (width 0.12))
${'' /* holes */}
(pad "" np_thru_hole circle (at ${def_pos}5 -3.75) (size 3 3) (drill 3) (layers *.Cu *.Mask))
(pad "" np_thru_hole circle (at 0 -5.95) (size 3 3) (drill 3) (layers *.Cu *.Mask))
${'' /* net pads */}
(pad 1 smd rect (at ${def_neg}3.275 -5.95 ${p.r}) (size 2.6 2.6) (layers ${def_side}.Cu ${def_side}.Paste ${def_side}.Mask) ${p.from})
(pad 2 smd rect (at ${def_pos}8.275 -3.75 ${p.r}) (size 2.6 2.6) (layers ${def_side}.Cu ${def_side}.Paste ${def_side}.Mask) ${p.to})
`
} else {
return `
${'' /* pins */}
(pad 1 thru_hole circle (at ${def_pos}5 -3.8) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask) ${p.from})
(pad 2 thru_hole circle (at ${def_pos}0 -5.9) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask) ${p.to})
`
}
}
if (p.reverse) {
return `
${standard}
${p.keycaps ? keycap : ''}
${pins('-', '', 'B')}
${pins('', '-', 'F')})
`
} else {
return `
${standard}
${p.keycaps ? keycap : ''}
${pins('-', '', 'B')})
`
}
}
}

View File

@ -0,0 +1,30 @@
module.exports = {
params: {
designator: 'D',
side: 'F',
from: undefined,
to: undefined
},
body: p => `
(module SmdDiode (layer ${p.side}.Cu) (tedit 65D012FE)
${p.at /* parametric position */}
${'' /* footprint reference */}
(fp_text reference "${p.ref}" (at 0 0) (layer ${p.side}.SilkS) ${p.ref_hide} (effects (font (size 1.27 1.27) (thickness 0.15))))
(fp_text value "" (at 0 0) (layer ${p.side}.SilkS) hide (effects (font (size 1.27 1.27) (thickness 0.15))))
${''/* diode symbols */}
(fp_line (start 0.25 0) (end 0.75 0) (layer ${p.side}.SilkS) (width 0.1))
(fp_line (start 0.25 0.4) (end -0.35 0) (layer ${p.side}.SilkS) (width 0.1))
(fp_line (start 0.25 -0.4) (end 0.25 0.4) (layer ${p.side}.SilkS) (width 0.1))
(fp_line (start -0.35 0) (end 0.25 -0.4) (layer ${p.side}.SilkS) (width 0.1))
(fp_line (start -0.35 0) (end -0.35 0.55) (layer ${p.side}.SilkS) (width 0.1))
(fp_line (start -0.35 0) (end -0.35 -0.55) (layer ${p.side}.SilkS) (width 0.1))
(fp_line (start -0.75 0) (end -0.35 0) (layer ${p.side}.SilkS) (width 0.1))
${''/* SMD pads */}
(pad 1 smd rect (at -1.65 0 ${p.r}) (size 0.9 1.2) (layers ${p.side}.Cu ${p.side}.Paste ${p.side}.Mask) ${p.to})
(pad 2 smd rect (at 1.65 0 ${p.r}) (size 0.9 1.2) (layers ${p.side}.Cu ${p.side}.Paste ${p.side}.Mask) ${p.from})
)
`
}

View File

@ -0,0 +1,24 @@
// MountingHole_2.2mm_M2
// Source: https://kicad.github.io/footprints/MountingHole
module.exports = {
nets: {
net: undefined
},
params: {
class: 'HOLE',
},
body: p => `
(module MountingHole_2.2mm_M2 (layer F.Cu) (tedit 56D1B4CB)
${p.at /* parametric position */}
(fp_text reference "${p.ref}" (at 0 -3.2) (layer F.SilkS) ${p.ref_hide}
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_circle (center 0 0) (end 2.2 0) (layer Cmts.User) (width 0.15))
(fp_circle (center 0 0) (end 2.45 0) (layer F.CrtYd) (width 0.05))
(pad 1 np_thru_hole circle (at 0 0) (size 2.2 2.2) (drill 2.2) (layers *.Cu *.Mask))
)
`
}

View File

@ -0,0 +1,136 @@
// Modified version of promicro.js
// -------------------------------
// Arduino ProMicro atmega32u4au
// Params
// orientation: default is down
// if down, power led will face the pcb
// if up, power led will face away from pcb
module.exports = {
params: {
designator: 'MCU',
orientation: 'down',
RAW: {type: 'net', value: 'RAW'},
GND: {type: 'net', value: 'GND'},
RST: {type: 'net', value: 'RST'},
VCC: {type: 'net', value: 'VCC'},
P21: {type: 'net', value: 'P21'},
P20: {type: 'net', value: 'P20'},
P19: {type: 'net', value: 'P19'},
P18: {type: 'net', value: 'P18'},
P15: {type: 'net', value: 'P15'},
P14: {type: 'net', value: 'P14'},
P16: {type: 'net', value: 'P16'},
P10: {type: 'net', value: 'P10'},
P1: {type: 'net', value: 'P1'},
P0: {type: 'net', value: 'P0'},
P2: {type: 'net', value: 'P2'},
P3: {type: 'net', value: 'P3'},
P4: {type: 'net', value: 'P4'},
P5: {type: 'net', value: 'P5'},
P6: {type: 'net', value: 'P6'},
P7: {type: 'net', value: 'P7'},
P8: {type: 'net', value: 'P8'},
P9: {type: 'net', value: 'P9'},
},
body: p => {
let def_neg, def_pos, side, mirror;
if (p.orientation === 'down') {
def_neg = '-';
def_pos = '';
side = 'B';
mirror = '(justify mirror)';
} else {
def_neg = '';
def_pos = '-';
side = 'F';
mirror = '';
}
return `
(module ProMicro (layer F.Cu) (tedit 5B307E4C)
${p.at /* parametric position */}
${'' /* footprint reference */}
(fp_text reference "${p.ref}" (at 0 0) (layer ${side}.SilkS) ${p.ref_hide} (effects (font (size 1.27 1.27) (thickness 0.15))))
(fp_text value "" (at 0 0) (layer ${side}.SilkS) hide (effects (font (size 1.27 1.27) (thickness 0.15))))
${'' /* illustration of the (possible) USB port overhang */}
(fp_line (start -19.304 -3.81) (end -14.224 -3.81) (layer Dwgs.User) (width 0.15))
(fp_line (start -19.304 3.81) (end -19.304 -3.81) (layer Dwgs.User) (width 0.15))
(fp_line (start -14.224 3.81) (end -19.304 3.81) (layer Dwgs.User) (width 0.15))
(fp_line (start -14.224 -3.81) (end -14.224 3.81) (layer Dwgs.User) (width 0.15))
${'' /* component outline */}
(fp_line (start -17.78 8.89) (end 15.24 8.89) (layer F.SilkS) (width 0.15))
(fp_line (start 15.24 8.89) (end 15.24 -8.89) (layer F.SilkS) (width 0.15))
(fp_line (start 15.24 -8.89) (end -17.78 -8.89) (layer F.SilkS) (width 0.15))
(fp_line (start -17.78 -8.89) (end -17.78 8.89) (layer F.SilkS) (width 0.15))
(fp_line (start -17.78 8.89) (end 15.24 8.89) (layer B.SilkS) (width 0.15))
(fp_line (start 15.24 8.89) (end 15.24 -8.89) (layer B.SilkS) (width 0.15))
(fp_line (start 15.24 -8.89) (end -17.78 -8.89) (layer B.SilkS) (width 0.15))
(fp_line (start -17.78 -8.89) (end -17.78 8.89) (layer B.SilkS) (width 0.15))
${'' /* extra border around "RAW", in case the rectangular shape is not distinctive enough */}
(fp_line (start -15.24 ${def_pos}6.35) (end -12.7 ${def_pos}6.35) (layer ${side}.SilkS) (width 0.15))
(fp_line (start -15.24 ${def_pos}6.35) (end -15.24 ${def_pos}8.89) (layer ${side}.SilkS) (width 0.15))
(fp_line (start -12.7 ${def_pos}6.35) (end -12.7 ${def_pos}8.89) (layer ${side}.SilkS) (width 0.15))
${'' /* pin names */}
(fp_text user RAW (at -13.97 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user GND (at -11.43 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user RST (at -8.89 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user VCC (at -6.35 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P21 (at -3.81 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P20 (at -1.27 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P19 (at 1.27 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P18 (at 3.81 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P15 (at 6.35 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P14 (at 8.89 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P16 (at 11.43 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P10 (at 13.97 ${def_pos}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P01 (at -13.97 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P00 (at -11.43 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user GND (at -8.89 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user GND (at -6.35 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P02 (at -3.81 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P03 (at -1.27 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P04 (at 1.27 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P05 (at 3.81 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P06 (at 6.35 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P07 (at 8.89 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P08 (at 11.43 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
(fp_text user P09 (at 13.97 ${def_neg}4.8 ${p.r + 90}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))
${'' /* and now the actual pins */}
(pad 1 thru_hole rect (at -13.97 ${def_pos}7.62 ${p.r}) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.RAW})
(pad 2 thru_hole circle (at -11.43 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.GND})
(pad 3 thru_hole circle (at -8.89 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.RST})
(pad 4 thru_hole circle (at -6.35 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.VCC})
(pad 5 thru_hole circle (at -3.81 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P21})
(pad 6 thru_hole circle (at -1.27 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P20})
(pad 7 thru_hole circle (at 1.27 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P19})
(pad 8 thru_hole circle (at 3.81 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P18})
(pad 9 thru_hole circle (at 6.35 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P15})
(pad 10 thru_hole circle (at 8.89 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P14})
(pad 11 thru_hole circle (at 11.43 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P16})
(pad 12 thru_hole circle (at 13.97 ${def_pos}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P10})
(pad 13 thru_hole circle (at -13.97 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P1})
(pad 14 thru_hole circle (at -11.43 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P0})
(pad 15 thru_hole circle (at -8.89 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.GND})
(pad 16 thru_hole circle (at -6.35 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.GND})
(pad 17 thru_hole circle (at -3.81 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P2})
(pad 18 thru_hole circle (at -1.27 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P3})
(pad 19 thru_hole circle (at 1.27 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P4})
(pad 20 thru_hole circle (at 3.81 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P5})
(pad 21 thru_hole circle (at 6.35 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P6})
(pad 22 thru_hole circle (at 8.89 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P7})
(pad 23 thru_hole circle (at 11.43 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P8})
(pad 24 thru_hole circle (at 13.97 ${def_neg}7.62 0) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) ${p.P9})
)
`;
}
}