def exit():
"""
Exit handler, which clears all custom chars and shuts down the display.
"""
try:
if not DISPLAY:
lcd = RPi_I2C_driver.lcd()
lcd.backlight(0)
if DEBUG:
print "exit()"
GPIO.cleanup()
except:
# avoids ugly KeyboardInterrupt trace on console...
pass
#####
#####
# MAIN HERE
评论列表
文章目录