def lcdThread(threadName, delay): LCD.lcd_init() while 1: time.sleep(delay) #print "%s: %s" % (threadName, time.ctime(time.time()) ) LCD.lcd_string(userName,LCD.LCD_LINE_1) LCD.lcd_string(time.ctime(time.time()),LCD.LCD_LINE_2) LCD.lcd_cleanup()
print "\nIn taskResetButton - reset button pressed" eventQ.put( (EVENT_MSG_RESET,"LOGGING OFF",time.time()) ) resetPinVal = GPIO.LOW time.sleep(3) resetPinVal = GPIO.input(KILL_APP_PIN) if killAppPinVal == GPIO.HIGH: print "\n\nKILL APP!!!\n\n" taskLCD_ID.exit() taskBadgeScan_ID.exit() taskDeviceAccessControl_ID.exit() return 0; LCD.lcd_init() def taskLCD(): while 1: #print "in taskLCD" time.sleep(0.3) if not LcdQ.empty(): LcdText = LcdQ.get() print "-------------------------------LCD Display:", LcdText LCD.lcd_string(LcdText[0],LCD.LCD_LINE_1) LCD.lcd_string(LcdText[1],LCD.LCD_LINE_2) def taskBadgeScan(): retcode = SCAN.scanInit()
def startLCD(): LCD.lcd_init() print "%s: %s" % ("WELCOME", time.ctime(time.time()) ) LCD.lcd_string("WELCOME",LCD.LCD_LINE_1) LCD.lcd_string(time.ctime(time.time()),LCD.LCD_LINE_2)