Exemple #1
0
def main():
    args = parse_args()

    buff = DisplayBuffer(DISPLAY_WIDTH, DISPLAY_HEIGHT)
    display = Display(buff, spi=not args.pygame, virtual=args.pygame)
    display.init()

    # Initialize layout driver
    layout = Layout(buff)
    layout.show_message(args.text.split('|'))
    display.refresh()

    if args.pygame:
        while True:
            time.sleep(1)
Exemple #2
0
def main():
    args = parse_args()

    buff = DisplayBuffer(DISPLAY_WIDTH, DISPLAY_HEIGHT)
    display = Display(buff, spi=not args.pygame, virtual=args.pygame)
    display.init()

    # Initialize layout driver
    layout = Layout(buff)
    texts = map(formatHexChars, [args.yestext, args.notext])
    layout.show_message(formatHexChars(args.text).split('|'), question=not args.noquestion, options=texts)
    display.refresh()

    if args.pygame:
        while True:
            time.sleep(1)
Exemple #3
0
def main():
    args = parse_args()

    buff = DisplayBuffer(DISPLAY_WIDTH, DISPLAY_HEIGHT)
    display = Display(buff, spi=not args.pygame, virtual=args.pygame)
    display.init()

    # Initialize layout driver
    layout = Layout(buff)

    if args.text:
      layout.show_message(args.text.split('|'))
    if args.image:
      im = [ord(x) ^ 0xFF for x in open(args.image, 'rb').read()[-(DISPLAY_WIDTH * DISPLAY_HEIGHT / 8):]]
      layout.show_logo(im)

    display.refresh()

    if args.pygame:
        while True:
            time.sleep(1)