EMF_Camp_Badge/hello_world/main.py

28 lines
573 B
Python
Raw Normal View History

2018-09-01 12:48:26 -04:00
"""This is a simple hello world app"""
2018-09-03 09:59:37 -04:00
___title___ = "Hello World"
2018-09-01 12:48:26 -04:00
___license___ = "MIT"
___dependencies___ = ["sleep", "app"]
___categories___ = ["EMF"]
2018-09-02 07:03:00 -04:00
import ugfx, sleep, app
2018-09-02 06:12:30 -04:00
from tilda import Buttons
2018-09-01 12:48:26 -04:00
# initialize screen
ugfx.init()
ugfx.clear()
2018-09-02 05:41:52 -04:00
# show text
2018-09-02 06:17:23 -04:00
ugfx.text(5, 5, "Hello World!!", ugfx.BLACK)
2018-09-02 05:41:52 -04:00
# waiting until a button has been pressed
while (not Buttons.is_pressed(Buttons.BTN_A)) and (not Buttons.is_pressed(Buttons.BTN_B)) and (not Buttons.is_pressed(Buttons.BTN_Menu)):
sleep.wfi()
# closing
ugfx.clear()
app.restart_to_default()