diff --git a/python/pcb.py b/python/pcb.py index 93a96df2db7615bce926b531f5669cc168c4746d..e534fad816e3ac8ba43e1b733a09cc4246f93ef5 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -5960,6 +5960,41 @@ class LED_RGB(part): self.pad.append(point(-dx,dy,0)) self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'G')) +class WS2812B(part): + # + # WS2812B RGB LED + # + def __init__(self,value=''): + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + padl = cube(-0.06,0,-0.02,0.02,0,0) + padr = cube(0,0.06,-0.02,0.02,0,0) + # + # pin 1 + # + self.shape = translate(padl,-0.067,0.065,0) + self.pad.append(point(-0.096,0.065,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'.V')) + # + # pin 2 + # + self.shape = add(self.shape,translate(padl,-0.067,-0.065,0)) + self.pad.append(point(-0.096,-0.065,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'DOUT')) + # + # pin 3 + # + self.shape = add(self.shape,translate(padr,0.067,-0.065,0)) + self.pad.append(point(0.096,-0.065,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND')) + # + # pin 4 + # + self.shape = add(self.shape,translate(padr,0.067,0.065,0)) + self.pad.append(point(0.096,0.065,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'DIN')) + class WS2812B_vinyl(part): # # WS2812B RGB LED vinyl cutter larger pads