Beispiel #1
0
from gfx import Gfx

rg16080b = RG16080B()

mygfx = Gfx()
count = 0
while True:

    count += 1

    #mygfx.setAllWhite()

    #data = mygfx.getData()
#       for i in range(0,160*80):
#               y = i / 160
#               x = i % 160
#               if data[i] == "1":
#                       display.setPixel(y,x,True)

    mygfx.writeText(5,5,"test");

    #mygfx.writeText(5,37,str(count))

    data = mygfx.getData()

    rg16080b.writePixels(data)
    #display.writePng()
    ### attendo

    print "Fine ciclo"
Beispiel #2
0
mygfx = Gfx()

while True:

    mygfx.clear()

    ### ricavo i dati
    band = getFileContent("/tmp/band.txt")
    relay = getFileContent("/tmp/relay.txt")
    presetA = getFileContent("/tmp/presetA.txt")
    presetTXTA = getFileContent("/tmp/presetTXTA.txt")
    presetTXTB = getFileContent("/tmp/presetTXTB.txt")
    tx = getFileContent("/tmp/tx.txt")

    ### stampo a schermo
    mygfx.writeText(5,0,"BANDA: " + band)
    #mygfx.writeText(5,15,"RELAY: " + relay)
    #mygfx.writeText(5,30,"PRESET: " + presetA)
    mygfx.writeText(5,15,"A: " + presetTXTA)
    mygfx.writeText(5,30,"B: " + presetTXTB)
    mygfx.writeText(5,45,"TX: " + tx)


    data = mygfx.getData()
#       for i in range(0,160*80):
#               y = i / 160
#               x = i % 160
#               if data[i] == "1":
#                       display.setPixel(y,x,True)

Beispiel #3
0
#display = Display("dummy")
mygfx = Gfx()

while True:

	mygfx.clear()

	### ricavo i dati
	band = getFileContent("/tmp/band.txt")
	relay = getFileContent("/tmp/relay.txt")
	presetA = getFileContent("/tmp/presetA.txt")
	presetTXTA = getFileContent("/tmp/presetTXTA.txt")
	tx = getFileContent("/tmp/tx.txt")

	### stampo a schermo
	mygfx.writeText(5,0,"BANDA: " + band)
	mygfx.writeText(5,15,"RELAY: " + relay)
	mygfx.writeText(5,30,"PRESET: " + presetA)
	mygfx.writeText(5,45,"" + presetTXTA)
	mygfx.writeText(5,60,"TX: " + tx)


	data = mygfx.getData()
#	for i in range(0,160*80):
#	        y = i / 160
#        	x = i % 160
#        	if data[i] == "1":
#                	display.setPixel(y,x,True)


	os.system("./MCP23017 "+data)