PhotoBooth.py 文件源码

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

项目:raspi-photo-booth 作者: kriskbx 项目源码 文件源码
def setup():
    if os.path.isdir(ImagePath) == False:
        os.mkdir(ImagePath, 0777)

    try:
        GPIO.cleanup()
    finally:
        pass

    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(BeepPin, GPIO.OUT)
    GPIO.setup(LedPin, GPIO.OUT)
    GPIO.setup(ButtonPin, GPIO.IN, pull_up_down=GPIO.PUD_UP)

    ledOn()
    beepOn()
    time.sleep(0.1)
    ledOff()
    beepOff()

# Loop, wait for button press
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号