def init(enable_menu_button=True): global _state _state = {"menu": False} ugfx_helper.init() if enable_menu_button: pass
def init(): # Background stuff ugfx_helper.init() ugfx.clear(ugfx.WHITE) # Colour stuff color = ugfx.html_color(333333) style = ugfx.Style() # [text_colour, edge_colour, fill_colour, progress_colour] style.set_enabled([color, color, ugfx.WHITE, ugfx.GREY]) style.set_background(ugfx.WHITE) ugfx.set_default_style(style)
def start(): ugfx_helper.init() loading_screen() if not wifi.is_connected(): try: wifi.connect() except OSError: display_error("Unable to connect to Wifi") return False try: load_account_details() except OSError as e: display_error("Unable to contact the server. Please try again later") return False if len(projects) == 0: display_error("Sorry, no projects are available to display") return False load_camera_dates() load_image_list() return True
""" ___name___ = "SMS" ___license___ = "MIT" ___dependencies___ = ["app", "dialogs", "sim800", "ugfx_helper"] ___categories___ = ["System"] ___bootstrapped___ = True from app import * from dialogs import * import ugfx import ugfx_helper import sim800 sim800.poweron() ugfx_helper.init() ugfx.clear() menuset = [] messages = sim800.listsms(4) def send_message(): number = "" message = "" while True: number = prompt_text("Number to message:", init_text=number, numeric=True) if number is None: return
def setUpClass(self): ugfx_helper.init()
def start(): ugfx_helper.init() loading_screen() utime.sleep_ms(2000) return True
def setUpClass(self): ugfx_helper.init() wifi.connect()