main.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:artwork 作者: shlinx 项目源码 文件源码
def __init__(self, sensor_pin=4):
        self.pir = MotionSensor(sensor_pin)
        self.led_pins = {}
        self.count = int(time.time())
        self.pir.when_motion = self.on_when_motion
        self.pir.when_no_motion = self.on_when_no_motion
        self.audio_file_index = 0
        self.led_color_index = 0
        for pin in LED_PINS:
            self.led_pins[pin] = LED(pin)
        print('Artwork is watching motions...')
        pause()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号