Beispiel #1
0
eve.draw(
    eve.FT800_DIAL,
    [
        335,  # x
        220,  # y
        30,  # radius
        0,  # options
        40000
    ])  # value in range 0..65535

eve.draw(
    eve.FT800_TOGGLE,
    [
        405,  # x
        215,  # y
        30,  # width
        22,  # font
        0,  # options
        0,  # state, 0 for off, 65535 for on
        "on"
        "\xff"
        "off".encode('utf-8')
    ])

eve.display()

sleep(10)

eve.disable(MIKROBUS_1)
spi.release()
#!/usr/bin/env python3
"""This example shows how to use the 8x8R Click wrapper of the LetMeCreate.

It gradually turns on all the LED's of the led matrix (8x8R Click) from the
bottom-right corner to the top-left corner.

The 8x8R Click must be inserted in Mikrobus 1 before running this program.
"""

from letmecreate.core.common import MIKROBUS_1
from letmecreate.core import spi
from letmecreate.click import led_matrix
from time import sleep


spi.init()
spi.select_bus(MIKROBUS_1)
led_matrix.enable()
led_matrix.set_intensity(3)

columns = [0] * 8

for cols in range(8):
    for lines in range(8):
        columns[cols] |= 1 << lines
        led_matrix.set_columns(columns)
        sleep(0.04)

led_matrix.disable()
spi.release()