diff --git a/python/pcb.py b/python/pcb.py index f69d3e867e803ffcd64c498395489bc378aed926..d61606fe1c3ed12d76f2a7f417df0f4674b48136 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -1365,10 +1365,45 @@ class ESC(part): self.pad.append(point(-d,.1,0)) self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND')) -class I2C4x1(part): +class I2C4x1h(part): # - # I2C 4x1 - # Sullins S5635-ND + # I2C 4x1 horizontal female + # GCT BG300-03-A-L-A + # + def __init__(self,value=''): + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + # + # pin 1: SCL + # + self.shape = translate(pad_header,0,-.15,0) + #self.shape = cylinder(.05,.15,0,0,.025) + self.pad.append(point(0,-.15,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'SCL')) + # + # pin 2: SDA + # + self.shape = add(self.shape,translate(pad_header,0,-.05,0)) + self.pad.append(point(0,-.05,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'SDA')) + # + # pin 3: VCC + # + self.shape = add(self.shape,translate(pad_header,0,.05,0)) + self.pad.append(point(0,.05,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'VCC')) + # + # pin 4: GND + # + self.shape = add(self.shape,translate(pad_header,0,.15,0)) + self.pad.append(point(0,.15,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND')) + +class I2C4x1v(part): + # + # I2C 4x1 vertical + # Sullins S5635-ND # def __init__(self,value=''): pad_header = cube(-.079/2,.079/2,-.039/2,.039/2,0,0)