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 ''
评论列表
文章目录