tests.py 文件源码

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

项目:PiAlarm 作者: KyleKing 项目源码 文件源码
def test_off_btn():
    print 'Checking that the alarm off button works'
    off_button = cg.get_pin('Input_Pins', 'off_button')
    GPIO.setwarnings(False)
    GPIO.setmode(GPIO.BCM)
    GPIO.setup(off_button, GPIO.IN)
    GPIO.add_event_detect(off_button, GPIO.BOTH, callback=gen_button_cb)
    sleep(5)

    print 'Checking that Pi-Blaster is booted'
    os.system('sudo python ./bootPiBlaster.py')
    print '** Getting started! Turning everything off **'
    all_off.run()
    print ''
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号