ergogen/src/footprints/oled.js
2022-12-04 18:40:06 +01:00

29 lines
No EOL
1.1 KiB
JavaScript

module.exports = {
params: {
designator: 'OLED',
side: 'F',
VCC: {type: 'net', value: 'VCC'},
GND: {type: 'net', value: 'GND'},
SDA: undefined,
SCL: undefined
},
body: p => `
(module lib:OLED_headers (layer F.Cu) (tedit 5E1ADAC2)
${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 OLED (at 0 -7.3) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))))
${'' /* pins */}
(pad 4 thru_hole oval (at 1.6 2.18 ${p.rot+270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
${p.SDA.str})
(pad 3 thru_hole oval (at 1.6 4.72 ${p.rot+270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
${p.SCL.str})
(pad 2 thru_hole oval (at 1.6 7.26 ${p.rot+270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
${p.VCC.str})
(pad 1 thru_hole rect (at 1.6 9.8 ${p.rot+270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
${p.GND.str})
)
`
}