コード例 #1
0
def displayLightning():
    lcd.setRGB(255, 0, 0)
    lcd.setText("Lightning!! \nDistance=" + str(LightningData.LastDistance) +
                "km")
コード例 #2
0
def initializingIOT():
    lcd.setRGB(0, 0, 128)
    lcd.setText("Initializing\nCalibration")
コード例 #3
0
def ThunderBoardFound(address):
    lcd.setRGB(0, 0, 128)
    lcd.setText("TBoard Found\nAddress=" + address)
コード例 #4
0
def startIOTLightning():
    lcd.setRGB(0, 128, 64)
    lcd.setText("ThunderBoardIOT\nV" + VERSIONNUMBER)
コード例 #5
0
def displayDisturber():
    lcd.setRGB(0, 200, 150)
    lcd.setText("Disturber\nDetected")
コード例 #6
0
def displayNoise():
    lcd.setRGB(0, 255, 150)
    lcd.setText("Noise\nDetected")
コード例 #7
0
def waitingForLightning():
    lcd.setRGB(0, 255, 0)
    lcd.setText("Waiting For\nLightning")
コード例 #8
0
import time
import grove_lcd as lcd

print "Testing LCD ------"


lcd.setText("Hello world\nThis is an LCD test")
lcd.setRGB(0,128,64)
time.sleep(2)
for c in range(255,0,-1):
     lcd.setText_norefresh("Going to sleep in {}...".format(str(c)))
     lcd.setRGB(c,255-c,0)
     time.sleep(0.1)
lcd.setRGB(0,255,0)
lcd.setText("Bye bye, this should wrap onto next line")

print "Testing LCD Complete ------"