Beispiel #1
0
def left_scroll(from_char, to_char, font = cp437_FONT):
    for i in range(8):
        time.sleep(0.1)
        for col in range(8):
            if col + i < 8:
                data = font[from_char][col + i]
            else:
                data = font[to_char][col + i - 8]

            send_byte(col + 1, data)
Beispiel #2
0
def render():
    for col in range(8):
        send_byte(col + 1, gfxbuf[col])
Beispiel #3
0
import max7219.led as led
import max7219.transitions as tr
import time
from max7219.led import send_byte
led.init()
#led.show_message("X",tr.up_scroll)
while True:
  for col in range(8):
    send_byte(col+1,0xFF) #0x81
    time.sleep(0.2)

  for col in range(8):
    send_byte(col+1,0x81)
    time.sleep(0.2)

Beispiel #4
0
def render():
    for col in range(8):
        send_byte(col + 1, gfxbuf[col])
Beispiel #5
0
def up_scroll(from_char, to_char, font = cp437_FONT):
    for i in range(7,-1,-1):
        time.sleep(0.1)
        for col in range(8):
            data = (font[from_char][col] >> (8 - i) | font[to_char][col] << i) & 0xFF
            send_byte(col + 1, data)