Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def scroll(direction):
    if direction == 0:  # UP
        for col in range(8):
            gfxbuf[col] >>= 1

    elif direction == 2: # RIGHT
        gfxbuf[0] = 0
        for col in range(6,-1,-1):
            gfxbuf[col+1] = gfxbuf[col]

    elif direction == 4: # DOWN
        for col in range(8):
            gfxbuf[col] <<= 1

    elif direction == 6: # LEFT
        for col in range(1,8):
            gfxbuf[col-1] = gfxbuf[col]
        gfxbuf[7] = 0

    elif direction < 8:  # DIAGONALS
        scroll(direction % 8 - 1)
        scroll(direction % 8 + 1)
        


src/m/a/max7219-HEAD/examples/test.py   max7219(Download)
    for x in range(500):
        canvas.set_on(4, 4)
        canvas.scroll(randrange(8))
        canvas.render()
        time.sleep(0.01)