code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" class Lux: scr = None iconImg = None luxLable = None unityLabel = None tipLabel = None def __init__(self, screen): self.scr = screen self.createLuxItem(self.scr, RESOURCES_ROOT + "lux.png", "Brightness") def crea...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/lux.py
Python
apache-2.0
1,848
import display_driver import page_welcome page_welcome.load_page()
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/main.py
Python
apache-2.0
68
import lvgl as lv from audio import Player RESOURCES_ROOT = "S:/data/pyamp/" functionImage = [ RESOURCES_ROOT + "images/prev.png", RESOURCES_ROOT + "images/play.png", RESOURCES_ROOT + "images/next.png", RESOURCES_ROOT + "images/favorite.png"] currentMusic = 0 musicData = [ { ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/music.py
Python
apache-2.0
12,889
import lvgl as lv import uos import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_settings page_settings.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_about.py
Python
apache-2.0
2,769
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors2 page_sensors2.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_airpressure.py
Python
apache-2.0
1,417
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors1 page_sensors1.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_angle.py
Python
apache-2.0
1,367
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def load_page(): scr = lv.obj() scr.set_style_bg_color(lv.color_black(), 0) backImg=lv.img(scr) backImg.set_src(RESOURCES_ROOT + "back.png") backImg.set_st...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_arc.py
Python
apache-2.0
736
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def load_page(): scr = lv.obj() scr.set_style_bg_color(lv.color_black(), 0) backImg=lv.img(scr) backImg.set_src(RESOURCES_ROOT + "back.png") backImg.set_st...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_bar.py
Python
apache-2.0
743
import lvgl as lv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" titles = ["line", "label", "image", "button", "bar", "arc", "btnmatrix", "checkbox", "dropdown", "roller", "slider", "switch", "table", "keyboard", "calendar", "led", "list", "meter...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_basic.py
Python
apache-2.0
6,697
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def event_handler(evt): code = evt.get_code() obj = evt.get_target() if code == lv.EVENT.VALUE_CHANGED : id = obj.get_selected_btn() txt = obj.get...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_btnmatrix.py
Python
apache-2.0
1,401
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def event_handler(evt): code = evt.get_code() if code == lv.EVENT.CLICKED: print("Clicked event seen") elif code == lv.EVENT.VALUE_CHANGED: print("Value changed seen") def back_click_callback(e, win): import page_basic ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_button.py
Python
apache-2.0
1,568
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" calendar = None def back_click_callback(e, win): import page_basic page_basic.load_page() def event_handler(evt): global calendar code = evt.get_code() if code == lv.EVENT.VALUE_CHANGED: source = evt.get_current_target() ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_calendar.py
Python
apache-2.0
1,623
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def event_handler(e): code = e.get_code() obj = e.get_target() if code == lv.EVENT.VALUE_CHANGED: txt = obj.get_text() if obj.get_state() & lv.STATE...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_checkbox.py
Python
apache-2.0
1,747
import lvgl as lv import wifi_module import _thread import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" wifiSSID = "" wifiPassword = "" def wifi_connect(): global wifiSSID global wifiPassword result = False result = wifi_module.wifi_connect(wifiSSID, wifiPassword) if (result ==...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_connect.py
Python
apache-2.0
1,637
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors2 page_sensors2.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_distance.py
Python
apache-2.0
1,393
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() # 下拉列表动作回调函数 def event_handler(e): code = e.get_code() obj = e.get_target() if code == lv.EVENT.VALUE_CHANGED: option = " "*10 # should be large enough to s...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_dropdown.py
Python
apache-2.0
1,396
import lvgl as lv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" def event1_handler(evt): code = evt.get_code() ele = evt.get_target() if code == lv.EVENT.CLICKED: import page_haas page_haas.load_page() elif code == lv.EVENT.PRESSED: ele.set_style_bg_color...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_failed.py
Python
apache-2.0
2,176
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors2 page_sensors2.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_fm.py
Python
apache-2.0
1,345
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors1 page_sensors1.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_gas.py
Python
apache-2.0
1,351
import lvgl as lv import wifi_module import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" images = [RESOURCES_ROOT + "basic_ui.png", RESOURCES_ROOT + "sensor_ui.png", RESOURCES_ROOT + "aiot_solution.png", RESOURCES_ROOT + "setting.png"] titles = ["基础UI", "传感器UI...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_haas.py
Python
apache-2.0
3,725
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors2 page_sensors2.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_hcho.py
Python
apache-2.0
1,362
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors1 page_sensors1.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_heartrate.py
Python
apache-2.0
1,399
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors2 page_sensors2.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_humidity.py
Python
apache-2.0
1,392
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors1 page_sensors1.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_humiture.py
Python
apache-2.0
1,391
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def load_page(): scr = lv.obj() scr.set_style_bg_color(lv.color_black(), 0) backImg=lv.img(scr) backImg.set_src(RESOURCES_ROOT + "back.png") backImg.set_st...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_image.py
Python
apache-2.0
804
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def ta_event_cb(e,kb): code = e.get_code() ta = e.get_target() if code == lv.EVENT.FOCUSED: kb.set_textarea(ta) kb.clear_flag(lv.obj.FLAG.HIDDEN) ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_keyboard.py
Python
apache-2.0
1,425
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def load_page(): scr = lv.obj() scr.set_style_bg_color(lv.color_black(), 0) backImg=lv.img(scr) backImg.set_src(RESOURCES_ROOT + "back.png") backImg.set_st...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_label.py
Python
apache-2.0
1,401
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def load_page(): scr = lv.obj() scr.set_style_bg_color(lv.color_black(), 0) backImg=lv.img(scr) backImg.set_src(RESOURCES_ROOT + "back.png") backImg.set_st...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_led.py
Python
apache-2.0
1,008
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def load_page(): scr = lv.obj() scr.set_style_bg_color(lv.color_black(), 0) backImg=lv.img(scr) backImg.set_src(RESOURCES_ROOT + "back.png") backImg.set_st...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_line.py
Python
apache-2.0
1,106
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" list1 = None def back_click_callback(e, win): import page_basic page_basic.load_page() def event_handler(e): global list1 code = e.get_code() obj = e.get_target() if code == lv.EVENT.CLICKED: print("Clicked: list1." + list...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_list.py
Python
apache-2.0
2,303
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors2 page_sensors2.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_lux.py
Python
apache-2.0
1,353
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" meter = None def back_click_callback(e, win): import page_basic page_basic.load_page() def set_value(indic, v): global meter meter.set_indicator_value(indic, v) def load_page(): global meter scr = lv.obj() scr.set_style_bg_color...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_meter.py
Python
apache-2.0
2,436
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def event_cb(e): mbox = e.get_current_target() print("Button %s clicked" % mbox.get_active_btn_text()) def load_page(): scr = lv.obj() scr.set_style_bg_color(l...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_msgbox.py
Python
apache-2.0
896
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def event_handler(e): code = e.get_code() obj = e.get_target() if code == lv.EVENT.VALUE_CHANGED: option = " "*10 obj.get_selected_str(option, len(o...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_roller.py
Python
apache-2.0
1,240
import lvgl as lv import _thread import wifi_module from driver import TIMER import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" tim0 = None ap_list = None WIFI_SCAN_CHECK_PERIOD_MS = 2000 # ms WIFI_SCAN_TIMEOUT_MS = 6000 # ms wifi_scan_fail_count = 0 def element_click_callback(e, name): global t...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_scan.py
Python
apache-2.0
4,042
import lvgl as lv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" def element_click_callback(e, name): print("intent: ", name) if (name == "back" or name == "retry"): import page_scan page_scan.load_page() elif (name == "skip"): import page_haas page_ha...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_scanfail.py
Python
apache-2.0
2,480
import lvgl as lv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" images = [RESOURCES_ROOT + "temperature.png", RESOURCES_ROOT + "humidity.png", RESOURCES_ROOT + "gas.png", RESOURCES_ROOT + "heartrate.png", RESOURCES_ROOT + "waterlevel.png", RESOU...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_sensors1.py
Python
apache-2.0
4,736
import lvgl as lv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" images = [RESOURCES_ROOT + "FM.png", RESOURCES_ROOT + "humidity.png", RESOURCES_ROOT + "lux.png", RESOURCES_ROOT + "distance.png", RESOURCES_ROOT + "airpressure.png", RESOURCES_ROOT...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_sensors2.py
Python
apache-2.0
4,736
import lvgl as lv from driver import TIMER RESOURCES_ROOT = "S:/data/pyamp/images/" images = [RESOURCES_ROOT + "wifi.png", RESOURCES_ROOT + "bluetooth.png", RESOURCES_ROOT + "brightness.png", RESOURCES_ROOT + "about.png"] titles = ["Wi-Fi", "Bluetooth", "Brightness",...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_settings.py
Python
apache-2.0
5,979
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" slider_label = None def back_click_callback(e, win): import page_basic page_basic.load_page() def slider_event_cb(e): global slider_label slider = e.get_target() slider_label.set_text("{:d}%".format(slider.get_value())) slider_label....
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_slider.py
Python
apache-2.0
1,167
import lvgl as lv from aliyunIoT import Device import _thread import ujson as json import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" IMAGE_NAME = "plate.jpg" label11 = None label22 = None device = None def element_pressed_cb(e): ele = e.get_target() ele.set_style_bg_color(lv.color_make(0x3...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_solutions.py
Python
apache-2.0
3,767
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def load_page(): scr = lv.obj() scr.set_style_bg_color(lv.color_black(), 0) backImg=lv.img(scr) backImg.set_src(RESOURCES_ROOT + "back.png") backImg.set_st...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_spans.py
Python
apache-2.0
1,925
import lvgl as lv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" def event2_handler(evt): code = evt.get_code() ele = evt.get_target() if code == lv.EVENT.CLICKED: import page_haas page_haas.load_page() elif code == lv.EVENT.PRESSED: ele.set_style_bg_color...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_success.py
Python
apache-2.0
1,378
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def event_handler(e): code = e.get_code() obj = e.get_target() if code == lv.EVENT.VALUE_CHANGED: if obj.has_state(lv.STATE.CHECKED): print("Sta...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_switch.py
Python
apache-2.0
1,385
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def draw_part_event_cb(e): obj = e.get_target() dsc = lv.obj_draw_part_dsc_t.__cast__(e.get_param()) # If the cells are drawn../ if dsc.part == lv.PART.ITEMS: ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_table.py
Python
apache-2.0
2,461
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def back_click_callback(e, win): import page_basic page_basic.load_page() def load_page(): scr = lv.obj() scr.set_style_bg_color(lv.color_black(), 0) backImg=lv.img(scr) backImg.set_src(RESOURCES_ROOT + "back.png") backImg.set_st...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_tabview.py
Python
apache-2.0
1,294
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors1 page_sensors1.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_temperature.py
Python
apache-2.0
1,416
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" def environment_back_click_callback(e, win): import page_sensors1 page_sensors1.load_page() def environment_back_press_callback(e, back_image): back_image.set_zoom(280) def environment_back_release_callback(e, back_image): back_image.set_zoo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_waterlevel.py
Python
apache-2.0
1,408
import lvgl as lv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" def element_pressed_cb(e): ele = e.get_target() ele.set_style_bg_color(lv.color_make(0x39, 0x39, 0x39), 0) def element_released_cb(e): ele = e.get_target() ele.set_style_bg_color(lv.color_make(0xf, 0xf, 0xf), 0) d...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_welcome.py
Python
apache-2.0
1,598
import lvgl as lv import kv import wifi_module import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" wifiImg = [RESOURCES_ROOT + "wifi0.png", RESOURCES_ROOT + "wifi1.png", RESOURCES_ROOT + "wifi2.png", RESOURCES_ROOT + "wifi3.png"] rssi = [3, 2, 1, 0] ssidInfoList = [...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_wifi0.py
Python
apache-2.0
7,630
import lvgl as lv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" wifiImg = [RESOURCES_ROOT + "wifi0.png", RESOURCES_ROOT + "wifi1.png", RESOURCES_ROOT + "wifi2.png", RESOURCES_ROOT + "wifi3.png"] rssi = [3, 2, 1, 0] ssidInfoList = [[3, "alibaba-inc", False, Tru...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_wifi1.py
Python
apache-2.0
7,417
import lvgl as lv import kv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" hidenImg = None hiden = False wifiSSID = "" wifiPswd = "" def element_click_callback(e, name): if (name == "back"): import page_scan page_scan.load_page() elif (name == "correct"): if (wif...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_wifi2.py
Python
apache-2.0
3,304
import lvgl as lv import font_Alibaba_PuHuiTi RESOURCES_ROOT = "S:/data/pyamp/images/" hidenImg = None hiden = False wifiSSID = "" wifiPswd = "" def element_click_callback(e, name): if (name == "back"): import page_scan page_scan.load_page() elif (name == "correct"): if (wifiSSID != "...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/page_wifi3.py
Python
apache-2.0
4,941
RESOURCES_ROOT = "S:/data/pyamp/" from environment import Environment from hvac import Hvac from compass import Compass from music import Music from soundttf import SoundTTF from timer import Timer def init(): print("main init") # import SDL as display # import lvgl as lv # lv.init() # display.in...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/smart_panel.py
Python
apache-2.0
6,684
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/" sound_ttf_alive = False def sound_ttf_back_click_callback(e, win): global sound_ttf_alive if (sound_ttf_alive): from smart_panel import load_smart_panel load_smart_panel() sound_ttf_alive = False def sound_ttf_back_press_callback(e,...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/soundttf.py
Python
apache-2.0
3,885
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" class Temperature: scr = None iconImg = None temperatureLable = None unityImg = None tipLabel = None def __init__(self, screen): self.scr = screen self.createTemperatureItem(self.scr, RESOURCES_ROOT + "temperature.png"...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/temperature.py
Python
apache-2.0
1,932
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/" isStarted = False isAnimationComplete = False arc = [None, None, None, None] anim = [None, None, None, None] timeCount = [1, 3, 5, 10] currentSelect = 0 minuteLabel = None secondLabel = None millionLabel = None anim_timeline = None startLabel = None currentValue = 0...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/timer.py
Python
apache-2.0
14,598
import lvgl as lv RESOURCES_ROOT = "S:/data/pyamp/images/" class Waterlevel: scr = None iconImg = None waterlevelLable = None unityLabel = None tipLabel = None def __init__(self, screen): self.scr = screen self.createWaterlevelItem(self.scr, RESOURCES_ROOT + "waterlevel.png",...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/waterlevel.py
Python
apache-2.0
1,957
import utime import sys def wifi_scan(): print('start wifi scan ...') import network sta_if = network.WLAN(network.STA_IF) sta_if.active(True) return(sta_if.scan()) def wifi_connect(wifiSSID, wifiPassword): print('start wifi connect ', wifiSSID) retry = 0 if (sys.platform == "esp32"): ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/data/pyamp/wifi_module.py
Python
apache-2.0
1,832
from micropython import const import ustruct import i2c_bus import utime as time # import deviceCfg _BTN_IRQ = const(0x46) def map_value(value, input_min, input_max, aims_min, aims_max): value = min(max(input_min, value), input_max) value_deal = (value - input_min) * (aims_max - aims_min) / (input_max - input...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/lib/axp192.py
Python
apache-2.0
7,575
from machine import I2C from machine import Pin from micropython import const import struct #import unit #PORTA = (unit.PORTA) PAHUB0 = (0, None) PAHUB1 = (1, None) PAHUB2 = (2, None) PAHUB3 = (3, None) PAHUB4 = (4, None) PAHUB5 = (5, None) M_BUS = (21, 22) UINT8LE = const((0 << 6) | (1 << 4) | 1) UINT16LE = const(...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/lib/i2c_bus.py
Python
apache-2.0
6,200
# -*- encoding: utf-8 -*- ''' @File : Player.py @Time : 2021/12/08 20:32:10 @Author : zeta.zz @License : (C)Copyright 2015-2021, M5STACK @Desc : Player I2S driver. ''' from machine import I2S from machine import Pin from axp192 import Axp192 from micropython import const import io import math impo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/lib/pcm.py
Python
apache-2.0
5,818
from minicv import ML AI_ENGINE_ALIYUN = 1 AI_ENGINE_NATIVE = 2 class AI: def __init__(self, type=AI_ENGINE_NATIVE, accessKey=None, accessSecret=None, ossEndpoint=None, ossBucket=None): self.type = type self.ml = ML() if (self.type == AI_ENGINE_ALIYUN): self.ml.open(self.ml.ML_...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/m5stackcore2/lib/uai.py
Python
apache-2.0
2,033
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 Nick Moore * Copyright (c) 2021 Jonathan Hogg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_adc.c
C
apache-2.0
11,369
#ifndef MICROPY_INCLUDED_MACHINE_ADC_H #define MICROPY_INCLUDED_MACHINE_ADC_H #include "machine_adcblock.h" typedef struct _madc_obj_t { mp_obj_base_t base; madcblock_obj_t *block; adc_channel_t channel_id; gpio_num_t gpio_id; } madc_obj_t; extern const madc_obj_t *madc_search_helper(madcblock_obj_t ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_adc.h
C
apache-2.0
535
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2021 Jonathan Hogg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Sof...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_adcblock.c
C
apache-2.0
7,319
#ifndef MICROPY_INCLUDED_MACHINE_ADCBLOCK_H #define MICROPY_INCLUDED_MACHINE_ADCBLOCK_H #include "esp_adc_cal.h" typedef struct _madcblock_obj_t { mp_obj_base_t base; adc_unit_t unit_id; mp_int_t bits; adc_bits_width_t width; esp_adc_cal_characteristics_t *characteristics[ADC_ATTEN_MAX]; } madcblo...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_adcblock.h
C
apache-2.0
690
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2021 Jim Mussared * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Soft...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_bitstream.c
C
apache-2.0
3,096
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 Nick Moore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Softwa...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_dac.c
C
apache-2.0
3,697
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 "Eric Poulsen" <eric@zyxod.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_hw_spi.c
C
apache-2.0
18,762
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2019 Damien P. George * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_i2c.c
C
apache-2.0
6,798
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2021 Mike Teachman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Sof...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_i2s.c
C
apache-2.0
31,628
/* * This file is part of the MicroPython project, http://micropython.org/ * * Development of the code in this file was sponsored by Microbric Pty Ltd * * The MIT License (MIT) * * Copyright (c) 2016 Damien P. George * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this so...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_pin.c
C
apache-2.0
23,901
/* * This file is part of the Micro Python project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2016 Damien P. George * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_pwm.c
C
apache-2.0
9,373
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 "Eric Poulsen" <eric@zyxod.com> * Copyright (c) 2017 "Tom Manning" <tom@manningetal.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this softwar...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_rtc.c
C
apache-2.0
6,539
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 "Eric Poulsen" <eric@zyxod.com> * Copyright (c) 2017 "Tom Manning" <tom@manningetal.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this softwar...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_rtc.h
C
apache-2.0
1,719
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2019 Nicko van Someren * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_sdcard.c
C
apache-2.0
14,691
/* * This file is part of the MicroPython project, http://micropython.org/ * * Development of the code in this file was sponsored by Microbric Pty Ltd * * The MIT License (MIT) * * Copyright (c) 2013-2015 Damien P. George * Copyright (c) 2016 Paul Sokolovsky * * Permission is hereby granted, free of charge, t...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_timer.c
C
apache-2.0
9,528
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 Nick Moore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Softwa...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_touchpad.c
C
apache-2.0
5,383
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2016 Damien P. George * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_uart.c
C
apache-2.0
18,222
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2016 Paul Sokolovsky * Copyright (c) 2017 Eric Poulsen * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (t...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/machine_wdt.c
C
apache-2.0
3,147
/* * This file is part of the MicroPython project, http://micropython.org/ * * Development of the code in this file was sponsored by Microbric Pty Ltd * * The MIT License (MIT) * * Copyright (c) 2016 Damien P. George * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this so...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/main.c
C
apache-2.0
10,918
# Set location of base MicroPython directory. if(NOT MICROPY_DIR) get_filename_component(MICROPY_DIR ${PROJECT_DIR}/../../engine ABSOLUTE) endif() # Include core source components. include(${MICROPY_DIR}/../modules/portmod.cmake) include(${MICROPY_DIR}/../external/external.cmake) # Include port extmod component. ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/main/CMakeLists.txt
CMake
apache-2.0
7,135
# Combine bootloader, partition table and application into a final binary. import os, sys sys.path.append(os.getenv("IDF_PATH") + "/components/partition_table") import gen_esp32part OFFSET_BOOTLOADER_DEFAULT = 0x1000 OFFSET_PARTITIONS_DEFAULT = 0x8000 def load_sdkconfig_hex_value(filename, value, default): va...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/makeimg.py
Python
apache-2.0
2,901
// this is needed for lib/crypto-algorithms/sha256.c #include <string.h>
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/memory.h
C
apache-2.0
73
/* * This file is part of the MicroPython project, http://micropython.org/ * * Development of the code in this file was sponsored by Microbric Pty Ltd * * The MIT License (MIT) * * Copyright (c) 2015 Paul Sokolovsky * Copyright (c) 2016 Damien P. George * * Permission is hereby granted, free of charge, to any...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modesp.c
C
apache-2.0
5,809
void esp_neopixel_write(uint8_t pin, uint8_t *pixels, uint32_t numBytes, uint8_t timing);
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modesp.h
C
apache-2.0
90
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 "Eric Poulsen" <eric@zyxod.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modesp32.c
C
apache-2.0
8,436
#ifndef MICROPY_INCLUDED_ESP32_MODESP32_H #define MICROPY_INCLUDED_ESP32_MODESP32_H #define RTC_VALID_EXT_PINS \ ( \ (1ll << 0) | \ (1ll << 2) | \ (1ll << 4) | \ (1ll << 12) | \ (1ll << 13) | \ (1ll << 14) | \ (1ll << 15) | \ (1ll << 25) | \ (1ll << 26) | \ (1ll << 27) | \ ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modesp32.h
C
apache-2.0
816
/* * This file is part of the MicroPython project, http://micropython.org/ * * Development of the code in this file was sponsored by Microbric Pty Ltd * * The MIT License (MIT) * * Copyright (c) 2013-2015 Damien P. George * Copyright (c) 2016 Paul Sokolovsky * * Permission is hereby granted, free of charge, t...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modmachine.c
C
apache-2.0
12,413
#ifndef MICROPY_INCLUDED_ESP32_MODMACHINE_H #define MICROPY_INCLUDED_ESP32_MODMACHINE_H #include "py/obj.h" typedef enum { // MACHINE_WAKE_IDLE=0x01, MACHINE_WAKE_SLEEP=0x02, MACHINE_WAKE_DEEPSLEEP=0x04 } wake_type_t; extern const mp_obj_type_t machine_timer_type; extern const mp_obj_type_t machine_wdt_t...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modmachine.h
C
apache-2.0
1,110
/* * This file is part of the MicroPython project, http://micropython.org/ * * Development of the code in this file was sponsored by Microbric Pty Ltd * and Mnemote Pty Ltd * * The MIT License (MIT) * * Copyright (c) 2016, 2017 Nick Moore @mnemote * Copyright (c) 2017 "Eric Poulsen" <eric@zyxod.com> * * Base...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modnetwork.c
C
apache-2.0
35,477
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 "Eric Poulsen" <eric@zyxod.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modnetwork.h
C
apache-2.0
1,731
/* * This file is part of the MicroPython project, http://micropython.org/ * * Development of the code in this file was sponsored by Microbric Pty Ltd * and Mnemote Pty Ltd * * The MIT License (MIT) * * Copyright (c) 2016, 2017 Nick Moore @mnemote * * Based on extmod/modlwip.c * Copyright (c) 2013, 2014 Dami...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modsocket.c
C
apache-2.0
29,996
import gc import uos from flashbdev import bdev try: if bdev: uos.mount(bdev, "/") except OSError: import inisetup vfs = inisetup.setup() gc.collect()
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modules/_boot.py
Python
apache-2.0
174
# APA106driver for MicroPython on ESP32 # MIT license; Copyright (c) 2016 Damien P. George from neopixel import NeoPixel class APA106(NeoPixel): ORDER = (0, 1, 2, 3)
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modules/apa106.py
Python
apache-2.0
173
from esp32 import Partition bdev = Partition.find(Partition.TYPE_DATA, label="vfs") bdev = bdev[0] if bdev else None
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modules/flashbdev.py
Python
apache-2.0
118
import uos from flashbdev import bdev def check_bootsec(): buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE bdev.readblocks(0, buf) empty = True for b in buf: if b != 0xFF: empty = False break if empty: return True fs_corrupted() def fs_corrupted(): ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modules/inisetup.py
Python
apache-2.0
1,066
try: import usocket as socket except: import socket try: import ustruct as struct except: import struct # (date(2000, 1, 1) - date(1900, 1, 1)).days * 24*60*60 NTP_DELTA = 3155673600 # The NTP host can be configured at runtime by doing: ntptime.host = 'myhost.org' host = "pool.ntp.org" def time(): ...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modules/ntptime.py
Python
apache-2.0
946
from minicv import ML AI_ENGINE_ALIYUN = 1 AI_ENGINE_NATIVE = 2 class AI: def __init__(self, type=AI_ENGINE_NATIVE, accessKey=None, accessSecret=None, ossEndpoint=None, ossBucket=None): self.type = type self.ml = ML() if (self.type == AI_ENGINE_ALIYUN): self.ml.open(self.ml.ML_...
YifuLiu/AliOS-Things
components/py_engine/adapter/esp32/modules/uai.py
Python
apache-2.0
2,033