Exemplo n.º 1
0
def ScreenOutput(TopLine, BottomLine):

    wiringpi2.lcdClear(lcdHandle)
    wiringpi2.lcdPosition(lcdHandle, lcdCol, lcdRow)
    wiringpi2.lcdPrintf(lcdHandle, TopLine)
    wiringpi2.lcdPosition(lcdHandle, lcdCol, lcdRow + 1)
    wiringpi2.lcdPrintf(lcdHandle, BottomLine)
def showSensors():
    global lcdFD
    global datas

    while True:
        threadLock.acquire()
        lst = datas
        threadLock.release()
        for x in xrange(0, len(lst)):
            wiringpi.lcdClear(lcdFD)
            data1 = lst[x]
            wiringpi.lcdPosition(lcdFD, 0, 0)
            wiringpi.lcdPrintf(lcdFD, "%s:" % (data1["name"]))
            wiringpi.lcdPosition(lcdFD, 0, 1)
            wiringpi.lcdPrintf(lcdFD, "%s%s" % (data1["data"], data1["symbol"]))
            time.sleep(5)
Exemplo n.º 3
0
def showSensors():
    global lcdFD
    global datas

    while True:
        threadLock.acquire()
        lst = datas
        threadLock.release()
        for x in xrange(0, len(lst)):
            wiringpi.lcdClear(lcdFD)
            data1 = lst[x]
            wiringpi.lcdPosition(lcdFD, 0,0)
            wiringpi.lcdPrintf(lcdFD,"%s:"%(data1["name"]))
            wiringpi.lcdPosition(lcdFD, 0,1)
            wiringpi.lcdPrintf(lcdFD,"%s%s"%(data1["data"],data1["symbol"]))
            time.sleep(5)
Exemplo n.º 4
0
def printLCD(line0="", line1=""):
    wiringpi2.lcdPosition(lcd, 0, 0)
    wiringpi2.lcdPrintf(lcd, line0 + BNK)
    wiringpi2.lcdPosition(lcd, 0, 1)
    wiringpi2.lcdPrintf(lcd, line1 + BNK)
Exemplo n.º 5
0
 def displayWrite(self,string):
     string=string[0:32]
     #GF.log("writing "+string+" to lcd",'D')
     wp.lcdClear(self.display1)
     wp.lcdHome(self.display1)
     wp.lcdPrintf(self.display1, string)
Exemplo n.º 6
0
def draw_lcd(lcd_line1, lcd_line2):
    wiringpi2.lcdClear(lcdHandle)
    wiringpi2.lcdPosition(lcdHandle, lcdCol, lcdRow)
    wiringpi2.lcdPrintf(lcdHandle, lcd_line1[:LCD_COL])
    wiringpi2.lcdPosition(lcdHandle, lcdCol, lcdRow + 1)
    wiringpi2.lcdPrintf(lcdHandle, lcd_line2[:LCD_COL])