def __init__(self):
GPIO.setmode(GPIO.BCM)
self.light = lightControl(self.light_pin, True)
self.redled = lightControl(self.red_pin)
self.yellowled = lightControl(self.yellow_pin)
self.motor = stepperControl()
GPIO.setup(self.trigger_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
self.motorstate = 0
self.smart_motor = False
self.smart_headroom = 25
self.triggertime = 0
self.qlen = 5
self.triggertimes = collections.deque([],self.qlen)
self.phototimes = collections.deque([],self.qlen)
评论列表
文章目录