Merge pull request #77 from bboortz/hello2

Close added to hello_world app
sammachin-gprs
Marek Ventur 2018-09-02 14:20:35 +01:00 committed by GitHub
commit b8afa052b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 2 deletions

View File

@ -5,11 +5,23 @@ ___license___ = "MIT"
___dependencies___ = ["sleep", "app"]
___categories___ = ["EMF"]
import ugfx, os, time, sleep, app
import ugfx, sleep, app
from tilda import Buttons
# initialize screen
ugfx.init()
ugfx.clear()
ugfx.text(5, 5, "Hello World!", ugfx.BLACK)
# show text
ugfx.text(5, 5, "Hello World!!", ugfx.BLACK)
# 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()