Beispiel #1
0
    def __init__(self, width=80, height=8):
        self.WIDTH, self.HEIGHT = width, height
        self.buffer = [[0 for i in xrange(self.WIDTH)] for i in xrange(self.HEIGHT)]

        self.isOn = False
        self.displayProcess = False
        self._continue = Value("b", 0)

        self.currentMessage = ""
        self.currentColor = 4

        ldp.init()
    def __init__(self, width=80, height=8):
        self.WIDTH, self.HEIGHT = width, height
        self.buffer = [[0 for i in xrange(self.WIDTH)]
                       for i in xrange(self.HEIGHT)]

        self.isOn = False
        self.displayProcess = False
        self._continue = Value('b', 0)

        self.currentMessage = ""
        self.currentColor = 4

        ldp.init()
Beispiel #3
0
 def __init__(self, q):
     self.q = q
     ldp.init()
     self.displaywidth = 80
     self.totalwidth = 0
     threading.Thread.__init__(self, name='matrix_Printer_thread')
Beispiel #4
0
    # function to read the matrix array and output the values to the display device
    #
    def showmatrix():
        ldp.displayoff()
        for row in reversed(range(8)):
            for col in reversed(range(80)):
                ldp.colourshift(matrix[row][col])
            ldp.showrow(row)
    # end def

    #
    # Main
    #
    # initialise the display
    #
    ldp.init()
    #
    # assign the command line args for the text and colour
    #

    textinput = str("{:,}".format(count*1000))
    # textinput=str(sys.argv[1])
    colour = 1

    # append extra characters to text input to allow for wrap-around
    textinput += '  ::  '

    # save the ascii values of the input characters into the inputarray
    # the font module uses the ascii value to index the font array
    inputarray = []
    for char in textinput:
Beispiel #5
0
def shiftmatrix():
	for row in range(16):
		for col in range(63,0,-1):
			matrix[row][col]=matrix[row][col-1]

def showmatrix(n):
	getnumber(n)
	while GPIO.input(35)==0 and GPIO.input(37)==0 and GPIO.input(37)==0:
		for row in range(16):
			for col in range(64):
				ldp.colourshift(matrix[row][col])
			ldp.showrow(row)
		sleep(0.001)
	getnumber("CLEANUP")
ldp.init()

displaywidth=64
totalwidth=0

def getnumber(n):
	if n=="CLEANUP":
		colour=0
	else:
		colour=2
	if type(n)==int:
		textinput=str(n)
	else:
		textinput=n

	inputarray=[]