Commit 2c01a522 authored by Neil Gershenfeld's avatar Neil Gershenfeld

wip

parent e3ef8cc5
Pipeline #3355 passed with stage
in 0 seconds
......@@ -2066,10 +2066,237 @@ class HCSR501(part):
self.pad.append(point(0,-.1,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND'))
pad_RN4871_left = cube(-0.5/25.4,1/25.4,-0.7/2/25.4,0.7/2/25.4,0,0)
pad_RN4871_right = cube(-1/25.4,0.5/25.4,-0.7/2/25.4,0.7/2/25.4,0,0)
pad_RN4871_bot = cube(-0.7/2/25.4,0.7/2/25.4,-0.5/25.4,1/25.4,0,0)
class RN4871(part):
#
# RN4871
#
def __init__(self,value=''):
self.value = value
self.pad = [point(0,0,0)]
self.labels = []
width = 9/25.4
height = 7.5/25.4
bottom = 1.9/25.4
left = 1.5/25.4
pitch = 1.2/25.4
size = .004
#
# pin 1:
#
self.shape = translate(pad_RN4871_left,-width/2.0,-height+bottom+4*pitch,0)
self.pad.append(point(-width/2.0,-height+bottom+4*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'BT_RF',line=size))
#
# pin 2:
#
self.shape = add(self.shape,translate(pad_RN4871_left,-width/2.0,-height+bottom+3*pitch,0))
self.pad.append(point(-width/2.0,-height+bottom+3*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND',line=size))
#
# pin 3:
#
self.shape = add(self.shape,translate(pad_RN4871_left,-width/2.0,-height+bottom+2*pitch,0))
self.pad.append(point(-width/2.0,-height+bottom+2*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'P1_2',line=size))
#
# pin 4:
#
self.shape = add(self.shape,translate(pad_RN4871_left,-width/2.0,-height+bottom+1*pitch,0))
self.pad.append(point(-width/2.0,-height+bottom+1*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'P1_3',line=size))
#
# pin 5:
#
self.shape = add(self.shape,translate(pad_RN4871_left,-width/2.0,-height+bottom+0*pitch,0))
self.pad.append(point(-width/2.0,-height+bottom+0*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'P1_7',line=size))
#
# pin 6:
#
self.shape = add(self.shape,translate(pad_RN4871_bot,-width/2.0+left+0*pitch,-height,0))
self.pad.append(point(-width/2.0+left+0*pitch,-height,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'P1_6',line=size,angle=90))
#
# pin 7:
#
self.shape = add(self.shape,translate(pad_RN4871_bot,-width/2.0+left+1*pitch,-height,0))
self.pad.append(point(-width/2.0+left+1*pitch,-height,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'RX',line=size,angle=90))
#
# pin 8:
#
self.shape = add(self.shape,translate(pad_RN4871_bot,-width/2.0+left+2*pitch,-height,0))
self.pad.append(point(-width/2.0+left+2*pitch,-height,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'TX',line=size,angle=90))
#
# pin 9:
#
self.shape = add(self.shape,translate(pad_RN4871_bot,-width/2.0+left+3*pitch,-height,0))
self.pad.append(point(-width/2.0+left+3*pitch,-height,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'P3_6',line=size,angle=90))
#
# pin 10:
#
self.shape = add(self.shape,translate(pad_RN4871_bot,-width/2.0+left+4*pitch,-height,0))
self.pad.append(point(-width/2.0+left+4*pitch,-height,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'RST_N',line=size,angle=90))
#
# pin 11:
#
self.shape = add(self.shape,translate(pad_RN4871_bot,-width/2.0+left+5*pitch,-height,0))
self.pad.append(point(-width/2.0+left+5*pitch,-height,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'P0_0',line=size,angle=90))
#
# pin 12:
#
self.shape = add(self.shape,translate(pad_RN4871_right,width/2.0,-height+bottom+0*pitch,0))
self.pad.append(point(width/2.0,-height+bottom+0*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'P0_2',line=size))
#
# pin 13:
#
self.shape = add(self.shape,translate(pad_RN4871_right,width/2.0,-height+bottom+1*pitch,0))
self.pad.append(point(width/2.0,-height+bottom+1*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND',line=size))
#
# pin 14:
#
self.shape = add(self.shape,translate(pad_RN4871_right,width/2.0,-height+bottom+2*pitch,0))
self.pad.append(point(width/2.0,-height+bottom+2*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'VBAT',line=size))
#
# pin 15:
#
self.shape = add(self.shape,translate(pad_RN4871_right,width/2.0,-height+bottom+3*pitch,0))
self.pad.append(point(width/2.0,-height+bottom+3*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'P2_7',line=size))
#
# pin 16:
#
self.shape = add(self.shape,translate(pad_RN4871_right,width/2.0,-height+bottom+4*pitch,0))
self.pad.append(point(width/2.0,-height+bottom+4*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'P2_0',line=size))
pad_HM11 = cube(-.047,.047,-.0177,.0177,0,0)
class HM11(part):
#
# HM-11
#
def __init__(self,value=''):
self.value = value
self.pad = [point(0,0,0)]
self.labels = []
height = 18.5/25.4
width = 13.5/25.4
pitch = 1.5/25.4
bottom = 1/25.4
offset = 0
size = .004
#
# pin 1:
#
self.shape = translate(pad_HM11,-width/2.0+offset,-height/2.0+bottom+7*pitch,0)
self.pad.append(point(-width/2.0+offset,-height/2.0+bottom+7*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'RTS',line=size))
#
# pin 2:
#
self.shape = add(self.shape,translate(pad_HM11,-width/2.0+offset,-height/2.0+bottom+6*pitch,0))
self.pad.append(point(-width/2.0+offset,-height/2.0+bottom+6*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'TX',line=size))
#
# pin 3:
#
self.shape = add(self.shape,translate(pad_HM11,-width/2.0+offset,-height/2.0+bottom+5*pitch,0))
self.pad.append(point(-width/2.0+offset,-height/2.0+bottom+5*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'CTS',line=size))
#
# pin 4:
#
self.shape = add(self.shape,translate(pad_HM11,-width/2.0+offset,-height/2.0+bottom+4*pitch,0))
self.pad.append(point(-width/2.0+offset,-height/2.0+bottom+4*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'RX',line=size))
#
# pin 5:
#
self.shape = add(self.shape,translate(pad_HM11,-width/2.0+offset,-height/2.0+bottom+3*pitch,0))
self.pad.append(point(-width/2.0+offset,-height/2.0+bottom+3*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'NC',line=size))
#
# pin 6:
#
self.shape = add(self.shape,translate(pad_HM11,-width/2.0+offset,-height/2.0+bottom+2*pitch,0))
self.pad.append(point(-width/2.0+offset,-height/2.0+bottom+2*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'NC',line=size))
#
# pin 7:
#
self.shape = add(self.shape,translate(pad_HM11,-width/2.0+offset,-height/2.0+bottom+1*pitch,0))
self.pad.append(point(-width/2.0+offset,-height/2.0+bottom+1*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'NC',line=size))
#
# pin 8:
#
self.shape = add(self.shape,translate(pad_HM11,-width/2.0+offset,-height/2.0+bottom+0*pitch,0))
self.pad.append(point(-width/2.0+offset,-height/2.0+bottom+0*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'NC',line=size))
#
# pin 9:
#
self.shape = add(self.shape,translate(pad_HM11,width/2.0-offset,-height/2.0+bottom+0*pitch,0))
self.pad.append(point(width/2.0-offset,-height/2.0+bottom+0*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'VCC',line=size))
#
# pin 10:
#
self.shape = add(self.shape,translate(pad_HM11,width/2.0-offset,-height/2.0+bottom+1*pitch,0))
self.pad.append(point(width/2.0-offset,-height/2.0+bottom+1*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'NC',line=size))
#
# pin 11:
#
self.shape = add(self.shape,translate(pad_HM11,width/2.0-offset,-height/2.0+bottom+2*pitch,0))
self.pad.append(point(width/2.0-offset,-height/2.0+bottom+2*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'RST',line=size))
#
# pin 12:
#
self.shape = add(self.shape,translate(pad_HM11,width/2.0-offset,-height/2.0+bottom+3*pitch,0))
self.pad.append(point(width/2.0-offset,-height/2.0+bottom+3*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND',line=size))
#
# pin 13:
#
self.shape = add(self.shape,translate(pad_HM11,width/2.0-offset,-height/2.0+bottom+4*pitch,0))
self.pad.append(point(width/2.0-offset,-height/2.0+bottom+4*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'IO3',line=size))
#
# pin 14:
#
self.shape = add(self.shape,translate(pad_HM11,width/2.0-offset,-height/2.0+bottom+5*pitch,0))
self.pad.append(point(width/2.0-offset,-height/2.0+bottom+5*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'IO2',line=size))
#
# pin 15:
#
self.shape = add(self.shape,translate(pad_HM11,width/2.0-offset,-height/2.0+bottom+6*pitch,0))
self.pad.append(point(width/2.0-offset,-height/2.0+bottom+6*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'IO1',line=size))
#
# pin 16:
#
self.shape = add(self.shape,translate(pad_HM11,width/2.0-offset,-height/2.0+bottom+7*pitch,0))
self.pad.append(point(width/2.0-offset,-height/2.0+bottom+7*pitch,0))
self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'IO0',line=size))
pad_ESP8266 = cube(-.0493,.0493,-.0197,.0197,0,0)
pad_ESP8266_bot = cube(-.0197,.0197,-.0415,.0415,0,0)
class ESP8266_12E(part):
#
# ESP8266 12E
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment