Exemplo n.º 1
0
from adafruit_pybadger import PyBadger

pybadger = PyBadger()

pybadger.show_badge(name_string="Blinka",
                    hello_scale=2,
                    my_name_is_scale=2,
                    name_scale=3)

while True:
    pybadger.auto_dim_display(delay=10)
    if pybadger.button.a:
        pybadger.show_business_card(image_name="Blinka.bmp",
                                    name_string="Blinka",
                                    name_scale=2,
                                    email_string_one="blinka@",
                                    email_string_two="adafruit.com")
    elif pybadger.button.b:
        pybadger.show_qr_code(data="https://circuitpython.org")
    elif pybadger.button.start:
        pybadger.show_badge(name_string="Blinka",
                            hello_scale=2,
                            my_name_is_scale=2,
                            name_scale=3)
Exemplo n.º 2
0
from adafruit_pybadger import PyBadger

pybadger = PyBadger()

pybadger.auto_dim_display(delay=10, movement_threshold=20)

first_display = True

while True:
    if pybadger.button.a:
        pybadger.show_business_card(image_name="supercon.bmp",
                                    name_string="gmackie",
                                    name_scale=1,
                                    email_string_one="*****@*****.**",
                                    email_string_two="https://gmac.io/")
    elif pybadger.button.b:
        pybadger.show_qr_code(data="https://wobscale.website")
    elif pybadger.button.start or first_display:
        pybadger.show_badge(name_string="gmackie",
                            hello_scale=2,
                            my_name_is_scale=2,
                            name_scale=2)
        first_display = False
Exemplo n.º 3
0
from adafruit_pybadger import PyBadger

pybadger = PyBadger()

while True:
    pybadger.show_badge(hello_scale=2, my_name_is_scale=2, name_scale=3)
    pybadger.auto_dim_display()

    if pybadger.button.a:
        pybadger.show_business_card(image_name="Blinka.bmp")
    elif pybadger.button.b:
        print("b B")
    elif pybadger.button.start:
        print("b start")
    elif pybadger.button.select:
        pybadger.show_qr_code()
Exemplo n.º 4
0
from adafruit_pybadger import PyBadger
display_name = "Your Name Here"
pybadger = PyBadger()

pybadger.show_badge(name_string=display_name,
                    hello_scale=2,
                    my_name_is_scale=2,
                    name_scale=2)

while True:
    pybadger.auto_dim_display(
        delay=10)  # Remove or comment out this line if you have the PyBadge LC
    try:
        if pybadger.button.a:
            pybadger.show_business_card(image_name="ccds_logo_160x160.bmp")
        elif pybadger.button.b:
            pybadger.show_qr_code(data="https://www.ccds.io/")
        elif pybadger.button.start:
            pybadger.show_badge(name_string=display_name,
                                hello_scale=2,
                                my_name_is_scale=2,
                                name_scale=2)
    except Exception as ex:
        print(ex)
Exemplo n.º 5
0
def show_badge():
    badge.show_badge(
        hello_font="Aller-14.bdf",
        hello_scale=1,
        my_name_is_font='Aller-14.bdf',
        my_name_is_scale=1,
        name_string="Mikey",
        name_scale=1,
        name_font="Warehouse-40.bdf",
    )


show_badge()

while True:
    badge.auto_dim_display(delay=30)
    if badge.button.a:
        badge.show_business_card(
            image_name="m_libby.bmp",
            name_string="Michael C. Libby",
            name_scale=1,
            name_font="Aller-14.bdf",
            email_string_one="m@",
            email_string_two="mlibby.com",
        )
    elif badge.button.b:
        badge.show_qr_code(data="https://mlibby.com")
    elif badge.button.start:
        show_badge()