micrOSDevToolKit 2.9.1__py3-none-any.whl → 2.26.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- env/driver_cp210x/macOS_VCP_Driver/SiLabsUSBDriverDisk.dmg +0 -0
- env/driver_cp210x/macOS_VCP_Driver/macOS_VCP_Driver_Release_Notes.txt +17 -1
- micrOS/micropython/esp32-20251209-v1.27.0.bin +0 -0
- micrOS/micropython/esp32c3-20251209-v1.27.0.bin +0 -0
- micrOS/micropython/esp32c6-20251209-v1.27.0.bin +0 -0
- micrOS/micropython/esp32s2-20251209-v1.27.0.bin +0 -0
- micrOS/micropython/esp32s2-LOLIN_MINI-20251209-v1.27.0.bin +0 -0
- micrOS/micropython/{esp32s3-20241129-v1.24.1.bin → esp32s3-4MBflash-20241129-v1.24.1.bin} +0 -0
- micrOS/micropython/esp32s3-8MBflash-20251209-v1.27.0.bin +0 -0
- micrOS/micropython/esp32s3_spiram_oct-20251209-v1.27.0.bin +0 -0
- micrOS/micropython/rpi-pico-w-20251209-v1.27.0.uf2 +0 -0
- micrOS/micropython/tinypico-20251209-v1.27.0.bin +0 -0
- micrOS/release_info/micrOS_ReleaseInfo/system_analysis_sum.json +167 -163
- micrOS/source/Auth.py +37 -0
- micrOS/source/Common.py +361 -116
- micrOS/source/Config.py +32 -22
- micrOS/source/Debug.py +50 -94
- micrOS/source/Espnow.py +377 -100
- micrOS/source/Files.py +207 -0
- micrOS/source/Hooks.py +48 -20
- micrOS/source/InterConnect.py +126 -42
- micrOS/source/Interrupts.py +6 -6
- micrOS/source/Logger.py +63 -26
- micrOS/source/Network.py +41 -21
- micrOS/source/Notify.py +48 -22
- micrOS/source/Pacman.py +326 -0
- micrOS/source/Scheduler.py +14 -54
- micrOS/source/Server.py +67 -69
- micrOS/source/Shell.py +99 -91
- micrOS/source/Tasks.py +141 -95
- micrOS/source/Time.py +19 -18
- micrOS/source/Types.py +53 -9
- micrOS/source/Web.py +381 -76
- micrOS/source/__pycache__/Common.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Debug.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Files.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Logger.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Scheduler.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Server.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Shell.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/replhelper.cpython-312.pyc +0 -0
- micrOS/source/config/_git.keep +0 -0
- micrOS/source/helpers.py +132 -0
- micrOS/source/micrOS.py +17 -7
- micrOS/source/micrOSloader.py +5 -12
- micrOS/source/microIO.py +44 -20
- micrOS/source/modules/IO_esp32c6.py +38 -0
- micrOS/source/{IO_esp32s3.py → modules/IO_esp32s3.py} +37 -1
- micrOS/source/{IO_m5stamp.py → modules/IO_m5stamp.py} +35 -1
- micrOS/source/{IO_qtpy.py → modules/IO_qtpy.py} +22 -17
- micrOS/source/{IO_tinypico.py → modules/IO_tinypico.py} +38 -0
- micrOS/source/modules/LM_L298N.py +161 -0
- {toolkit/workspace/precompiled → micrOS/source/modules}/LM_L9110_DCmotor.py +3 -3
- micrOS/source/{LM_OV2640.py → modules/LM_OV2640.py} +45 -27
- micrOS/source/{LM_VL53L0X.py → modules/LM_VL53L0X.py} +3 -3
- micrOS/source/{LM_aht10.py → modules/LM_aht10.py} +2 -2
- micrOS/source/{LM_bme280.py → modules/LM_bme280.py} +3 -3
- micrOS/source/{LM_buzzer.py → modules/LM_buzzer.py} +18 -25
- micrOS/source/{LM_cct.py → modules/LM_cct.py} +17 -21
- micrOS/source/modules/LM_cluster.py +255 -0
- micrOS/source/{LM_co2.py → modules/LM_co2.py} +3 -3
- micrOS/source/{LM_dht11.py → modules/LM_dht11.py} +2 -2
- micrOS/source/{LM_dht22.py → modules/LM_dht22.py} +2 -2
- micrOS/source/{LM_dimmer.py → modules/LM_dimmer.py} +9 -9
- micrOS/source/{LM_distance.py → modules/LM_distance.py} +4 -6
- micrOS/source/{LM_ds18.py → modules/LM_ds18.py} +2 -2
- micrOS/source/{LM_esp32.py → modules/LM_esp32.py} +5 -0
- micrOS/source/modules/LM_espnow.py +53 -0
- micrOS/source/modules/LM_fileserver.py +265 -0
- micrOS/source/{LM_genIO.py → modules/LM_genIO.py} +52 -37
- micrOS/source/{LM_haptic.py → modules/LM_haptic.py} +2 -2
- {toolkit/workspace/precompiled → micrOS/source/modules}/LM_i2c.py +5 -4
- micrOS/source/{LM_i2s_mic.py → modules/LM_i2s_mic.py} +6 -7
- micrOS/source/{LM_ld2410.py → modules/LM_ld2410.py} +2 -2
- micrOS/source/{LM_light_sensor.py → modules/LM_light_sensor.py} +10 -21
- micrOS/source/modules/LM_mh_z19c.py +198 -0
- micrOS/source/modules/LM_neoeffects.py +284 -0
- micrOS/source/{LM_neopixel.py → modules/LM_neopixel.py} +19 -23
- micrOS/source/{LM_oled.py → modules/LM_oled.py} +2 -2
- micrOS/source/{LM_oled_sh1106.py → modules/LM_oled_sh1106.py} +3 -3
- micrOS/source/{LM_oled_ui.py → modules/LM_oled_ui.py} +72 -64
- micrOS/source/modules/LM_pacman.py +320 -0
- micrOS/source/{LM_presence.py → modules/LM_presence.py} +11 -15
- micrOS/source/modules/LM_qmi8658.py +204 -0
- micrOS/source/{LM_rencoder.py → modules/LM_rencoder.py} +2 -2
- micrOS/source/{LM_rest.py → modules/LM_rest.py} +4 -6
- micrOS/source/{LM_rgb.py → modules/LM_rgb.py} +21 -29
- micrOS/source/{LM_roboarm.py → modules/LM_roboarm.py} +8 -8
- micrOS/source/modules/LM_robustness.py +137 -0
- micrOS/source/{LM_servo.py → modules/LM_servo.py} +3 -3
- micrOS/source/{LM_stepper.py → modules/LM_stepper.py} +5 -5
- micrOS/source/{LM_switch.py → modules/LM_switch.py} +11 -9
- micrOS/source/{LM_system.py → modules/LM_system.py} +38 -32
- micrOS/source/modules/LM_tcs3472.py +187 -0
- micrOS/source/{LM_telegram.py → modules/LM_telegram.py} +164 -116
- micrOS/source/{LM_trackball.py → modules/LM_trackball.py} +3 -3
- micrOS/source/{LM_veml7700.py → modules/LM_veml7700.py} +2 -2
- micrOS/source/modules/LM_web.py +38 -0
- micrOS/source/urequests.py +39 -15
- {toolkit/workspace/precompiled → micrOS/source/web}/dashboard.html +4 -0
- micrOS/source/web/editor.js +440 -0
- micrOS/source/web/filesui.html +178 -0
- micrOS/source/web/filesui.js +338 -0
- {toolkit/workspace/precompiled → micrOS/source/web}/index.html +44 -2
- micrOS/source/{uapi.js → web/uapi.js} +48 -7
- micrOS/source/{ustyle.css → web/ustyle.css} +6 -3
- micrOS/utests/__init__.py +0 -0
- micrOS/utests/test_scheduler.py +435 -0
- {micrOSDevToolKit-2.9.1.data → microsdevtoolkit-2.26.1.data}/scripts/devToolKit.py +33 -3
- {micrOSDevToolKit-2.9.1.dist-info → microsdevtoolkit-2.26.1.dist-info}/METADATA +327 -268
- microsdevtoolkit-2.26.1.dist-info/RECORD +396 -0
- {micrOSDevToolKit-2.9.1.dist-info → microsdevtoolkit-2.26.1.dist-info}/WHEEL +1 -1
- toolkit/DevEnvCompile.py +63 -33
- toolkit/DevEnvOTA.py +58 -22
- toolkit/DevEnvUSB.py +110 -55
- toolkit/Gateway.py +6 -6
- toolkit/LM_to_compile.dat +6 -4
- toolkit/MicrOSDevEnv.py +127 -57
- toolkit/WebRepl.py +73 -0
- toolkit/dashboard_apps/BackupRestore.py +20 -35
- toolkit/dashboard_apps/CCTDemo.py +12 -17
- toolkit/dashboard_apps/CCTTest.py +20 -24
- toolkit/dashboard_apps/CamStream.py +2 -6
- toolkit/dashboard_apps/CatGame.py +14 -16
- toolkit/dashboard_apps/Dimmer.py +11 -21
- toolkit/dashboard_apps/GetVersion.py +11 -19
- toolkit/dashboard_apps/MicrophoneTest.py +1 -6
- toolkit/dashboard_apps/NeoEffectsDemo.py +22 -35
- toolkit/dashboard_apps/NeopixelTest.py +20 -25
- toolkit/dashboard_apps/PresenceTest.py +2 -8
- toolkit/dashboard_apps/QMI8685_GYRO.py +68 -0
- toolkit/dashboard_apps/RGBTest.py +20 -24
- toolkit/dashboard_apps/RoboArm.py +24 -32
- toolkit/dashboard_apps/SED_test.py +10 -14
- toolkit/dashboard_apps/SensorsTest.py +61 -0
- toolkit/dashboard_apps/SystemTest.py +202 -105
- toolkit/dashboard_apps/Template_app.py +11 -23
- toolkit/dashboard_apps/_app_base.py +34 -0
- toolkit/dashboard_apps/_gyro_visualizer.py +78 -0
- toolkit/dashboard_apps/uLightDemo.py +15 -24
- toolkit/index.html +4 -4
- toolkit/lib/LocalMachine.py +6 -1
- toolkit/lib/MicrosFiles.py +46 -0
- toolkit/lib/Repository.py +64 -0
- toolkit/lib/TerminalColors.py +4 -0
- toolkit/lib/macroScript.py +6 -0
- toolkit/lib/micrOSClient.py +123 -50
- toolkit/lib/micrOSClientHistory.py +156 -0
- toolkit/lib/pip_package_installer.py +5 -2
- toolkit/micrOSdashboard.py +12 -17
- toolkit/micrOSlint.py +20 -8
- toolkit/simulator_lib/__pycache__/IO_darwin.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/aioespnow.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/framebuf.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/machine.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/micropython.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/mip.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/neopixel.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/network.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/sim_common.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/simgc.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/simulator.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/uasyncio.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/uos.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/urandom.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/usocket.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/ussl.cpython-312.pyc +0 -0
- toolkit/simulator_lib/aioespnow.py +28 -0
- toolkit/simulator_lib/dht.py +1 -1
- toolkit/simulator_lib/framebuf.py +49 -1
- toolkit/simulator_lib/machine.py +17 -2
- toolkit/simulator_lib/micropython.py +3 -3
- toolkit/simulator_lib/mip.py +165 -0
- toolkit/simulator_lib/neopixel.py +3 -2
- toolkit/simulator_lib/network.py +2 -1
- toolkit/simulator_lib/node_config.json +2 -3
- toolkit/simulator_lib/ntptime.py +1 -1
- toolkit/simulator_lib/{sim_console.py → sim_common.py} +2 -3
- toolkit/simulator_lib/simgc.py +6 -2
- toolkit/simulator_lib/simulator.py +137 -59
- toolkit/simulator_lib/uasyncio.py +33 -2
- toolkit/simulator_lib/uos.py +147 -0
- toolkit/simulator_lib/urandom.py +4 -0
- toolkit/socketClient.py +43 -23
- toolkit/user_data/webhooks/generic.py +1 -1
- toolkit/user_data/webhooks/macro.py +1 -1
- toolkit/user_data/webhooks/template.py +1 -1
- toolkit/workspace/precompiled/Auth.mpy +0 -0
- toolkit/workspace/precompiled/Common.mpy +0 -0
- toolkit/workspace/precompiled/Config.mpy +0 -0
- toolkit/workspace/precompiled/Debug.mpy +0 -0
- toolkit/workspace/precompiled/Espnow.mpy +0 -0
- toolkit/workspace/precompiled/Files.mpy +0 -0
- toolkit/workspace/precompiled/Hooks.mpy +0 -0
- toolkit/workspace/precompiled/InterConnect.mpy +0 -0
- toolkit/workspace/precompiled/Interrupts.mpy +0 -0
- toolkit/workspace/precompiled/Logger.mpy +0 -0
- toolkit/workspace/precompiled/Network.mpy +0 -0
- toolkit/workspace/precompiled/Notify.mpy +0 -0
- toolkit/workspace/precompiled/Pacman.mpy +0 -0
- toolkit/workspace/precompiled/Scheduler.mpy +0 -0
- toolkit/workspace/precompiled/Server.mpy +0 -0
- toolkit/workspace/precompiled/Shell.mpy +0 -0
- toolkit/workspace/precompiled/Tasks.mpy +0 -0
- toolkit/workspace/precompiled/Time.mpy +0 -0
- toolkit/workspace/precompiled/Types.mpy +0 -0
- toolkit/workspace/precompiled/Web.mpy +0 -0
- toolkit/workspace/precompiled/_mpy.version +1 -1
- toolkit/workspace/precompiled/config/_git.keep +0 -0
- toolkit/workspace/precompiled/helpers.mpy +0 -0
- toolkit/workspace/precompiled/micrOS.mpy +0 -0
- toolkit/workspace/precompiled/micrOSloader.mpy +0 -0
- toolkit/workspace/precompiled/microIO.mpy +0 -0
- toolkit/workspace/precompiled/{IO_esp32.mpy → modules/IO_esp32.mpy} +0 -0
- toolkit/workspace/precompiled/{IO_esp32c3.mpy → modules/IO_esp32c3.mpy} +0 -0
- toolkit/workspace/precompiled/modules/IO_esp32c6.mpy +0 -0
- toolkit/workspace/precompiled/{IO_esp32s2.mpy → modules/IO_esp32s2.mpy} +0 -0
- toolkit/workspace/precompiled/modules/IO_esp32s3.mpy +0 -0
- toolkit/workspace/precompiled/modules/IO_m5stamp.mpy +0 -0
- toolkit/workspace/precompiled/modules/IO_qtpy.mpy +0 -0
- toolkit/workspace/precompiled/modules/IO_rp2.mpy +0 -0
- toolkit/workspace/precompiled/modules/IO_tinypico.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_L298N.mpy +0 -0
- {micrOS/source → toolkit/workspace/precompiled/modules}/LM_L9110_DCmotor.py +3 -3
- toolkit/workspace/precompiled/modules/LM_OV2640.mpy +0 -0
- toolkit/workspace/precompiled/{LM_VL53L0X.py → modules/LM_VL53L0X.py} +3 -3
- toolkit/workspace/precompiled/{LM_aht10.mpy → modules/LM_aht10.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_bme280.mpy → modules/LM_bme280.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_buzzer.mpy → modules/LM_buzzer.mpy} +0 -0
- toolkit/workspace/precompiled/modules/LM_cct.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_cluster.mpy +0 -0
- toolkit/workspace/precompiled/{LM_co2.mpy → modules/LM_co2.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_dht11.mpy → modules/LM_dht11.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_dht22.mpy → modules/LM_dht22.mpy} +0 -0
- toolkit/workspace/precompiled/modules/LM_dimmer.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_distance.mpy +0 -0
- toolkit/workspace/precompiled/{LM_ds18.mpy → modules/LM_ds18.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_esp32.py → modules/LM_esp32.py} +5 -0
- toolkit/workspace/precompiled/modules/LM_espnow.py +53 -0
- toolkit/workspace/precompiled/modules/LM_fileserver.mpy +0 -0
- toolkit/workspace/precompiled/{LM_gameOfLife.mpy → modules/LM_gameOfLife.mpy} +0 -0
- toolkit/workspace/precompiled/modules/LM_genIO.mpy +0 -0
- toolkit/workspace/precompiled/{LM_haptic.mpy → modules/LM_haptic.mpy} +0 -0
- {micrOS/source → toolkit/workspace/precompiled/modules}/LM_i2c.py +5 -4
- toolkit/workspace/precompiled/modules/LM_i2s_mic.mpy +0 -0
- toolkit/workspace/precompiled/{LM_ld2410.mpy → modules/LM_ld2410.mpy} +0 -0
- toolkit/workspace/precompiled/modules/LM_light_sensor.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_mh_z19c.py +198 -0
- toolkit/workspace/precompiled/modules/LM_neoeffects.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_neopixel.mpy +0 -0
- toolkit/workspace/precompiled/{LM_oled.mpy → modules/LM_oled.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_oled_sh1106.mpy → modules/LM_oled_sh1106.mpy} +0 -0
- toolkit/workspace/precompiled/modules/LM_oled_ui.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_pacman.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_presence.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_qmi8658.py +204 -0
- toolkit/workspace/precompiled/{LM_rencoder.py → modules/LM_rencoder.py} +2 -2
- toolkit/workspace/precompiled/modules/LM_rest.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_rgb.mpy +0 -0
- toolkit/workspace/precompiled/{LM_rgbcct.mpy → modules/LM_rgbcct.mpy} +0 -0
- toolkit/workspace/precompiled/modules/LM_roboarm.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_robustness.py +137 -0
- toolkit/workspace/precompiled/{LM_servo.mpy → modules/LM_servo.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_sound_event.mpy → modules/LM_sound_event.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_stepper.mpy → modules/LM_stepper.mpy} +0 -0
- toolkit/workspace/precompiled/modules/LM_switch.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_system.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_tcs3472.py +187 -0
- toolkit/workspace/precompiled/modules/LM_telegram.mpy +0 -0
- toolkit/workspace/precompiled/{LM_tinyrgb.mpy → modules/LM_tinyrgb.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_trackball.mpy → modules/LM_trackball.mpy} +0 -0
- toolkit/workspace/precompiled/{LM_veml7700.mpy → modules/LM_veml7700.mpy} +0 -0
- toolkit/workspace/precompiled/modules/LM_web.mpy +0 -0
- toolkit/workspace/precompiled/urequests.mpy +0 -0
- {micrOS/source → toolkit/workspace/precompiled/web}/dashboard.html +4 -0
- toolkit/workspace/precompiled/web/editor.js +440 -0
- toolkit/workspace/precompiled/web/filesui.html +178 -0
- toolkit/workspace/precompiled/web/filesui.js +338 -0
- {micrOS/source → toolkit/workspace/precompiled/web}/index.html +44 -2
- toolkit/workspace/precompiled/{uapi.js → web/uapi.js} +48 -7
- toolkit/workspace/precompiled/{ustyle.css → web/ustyle.css} +6 -3
- micrOS/micropython/esp32-20241129-v1.24.1.bin +0 -0
- micrOS/micropython/esp32c3-20240222-v1.22.2.bin +0 -0
- micrOS/micropython/esp32s2-20240602-v1.23.0.bin +0 -0
- micrOS/micropython/esp32s2-LOLIN_MINI-20220618-v1.19.1.bin +0 -0
- micrOS/micropython/esp32s2-LOLIN_MINI-20240602-v1.23.0.bin +0 -0
- micrOS/micropython/esp32s3-20240105-v1.22.1.bin +0 -0
- micrOS/micropython/esp32s3_spiram_oct-20231005-v1.21.0.bin +0 -0
- micrOS/micropython/esp32s3_spiram_oct-20241129-v1.24.1.bin +0 -0
- micrOS/micropython/rpi-pico-w-20241129-v1.24.1.uf2 +0 -0
- micrOS/micropython/tinypico-20241129-v1.24.1.bin +0 -0
- micrOS/source/LM_L298N_DCmotor.py +0 -86
- micrOS/source/LM_catgame.py +0 -75
- micrOS/source/LM_dashboard_be.py +0 -37
- micrOS/source/LM_demo.py +0 -97
- micrOS/source/LM_espnow.py +0 -23
- micrOS/source/LM_intercon.py +0 -57
- micrOS/source/LM_keychain.py +0 -322
- micrOS/source/LM_lmpacman.py +0 -126
- micrOS/source/LM_neoeffects.py +0 -331
- micrOS/source/LM_oledui.py +0 -972
- micrOS/source/LM_pet_feeder.py +0 -78
- micrOS/source/LM_ph_sensor.py +0 -51
- micrOS/source/LM_robustness.py +0 -74
- micrOS/source/reset.py +0 -11
- micrOSDevToolKit-2.9.1.dist-info/RECORD +0 -365
- toolkit/dashboard_apps/AirQualityBME280.py +0 -36
- toolkit/dashboard_apps/AirQualityDHT22_CO2.py +0 -36
- toolkit/lib/file_extensions.py +0 -16
- toolkit/simulator_lib/__pycache__/sim_console.cpython-312.pyc +0 -0
- toolkit/simulator_lib/__pycache__/sim_console.cpython-38.pyc +0 -0
- toolkit/simulator_lib/__pycache__/sim_console.cpython-39.pyc +0 -0
- toolkit/workspace/precompiled/IO_esp32s3.mpy +0 -0
- toolkit/workspace/precompiled/IO_m5stamp.mpy +0 -0
- toolkit/workspace/precompiled/IO_qtpy.mpy +0 -0
- toolkit/workspace/precompiled/IO_rp2.mpy +0 -0
- toolkit/workspace/precompiled/IO_tinypico.mpy +0 -0
- toolkit/workspace/precompiled/LM_L298N_DCmotor.mpy +0 -0
- toolkit/workspace/precompiled/LM_OV2640.mpy +0 -0
- toolkit/workspace/precompiled/LM_catgame.py +0 -75
- toolkit/workspace/precompiled/LM_cct.mpy +0 -0
- toolkit/workspace/precompiled/LM_dashboard_be.py +0 -37
- toolkit/workspace/precompiled/LM_demo.py +0 -97
- toolkit/workspace/precompiled/LM_dimmer.mpy +0 -0
- toolkit/workspace/precompiled/LM_distance.mpy +0 -0
- toolkit/workspace/precompiled/LM_espnow.py +0 -23
- toolkit/workspace/precompiled/LM_genIO.mpy +0 -0
- toolkit/workspace/precompiled/LM_i2s_mic.mpy +0 -0
- toolkit/workspace/precompiled/LM_intercon.mpy +0 -0
- toolkit/workspace/precompiled/LM_keychain.mpy +0 -0
- toolkit/workspace/precompiled/LM_light_sensor.mpy +0 -0
- toolkit/workspace/precompiled/LM_lmpacman.mpy +0 -0
- toolkit/workspace/precompiled/LM_neoeffects.mpy +0 -0
- toolkit/workspace/precompiled/LM_neopixel.mpy +0 -0
- toolkit/workspace/precompiled/LM_oled_ui.mpy +0 -0
- toolkit/workspace/precompiled/LM_oledui.mpy +0 -0
- toolkit/workspace/precompiled/LM_pet_feeder.py +0 -78
- toolkit/workspace/precompiled/LM_ph_sensor.py +0 -51
- toolkit/workspace/precompiled/LM_presence.mpy +0 -0
- toolkit/workspace/precompiled/LM_rest.mpy +0 -0
- toolkit/workspace/precompiled/LM_rgb.mpy +0 -0
- toolkit/workspace/precompiled/LM_roboarm.mpy +0 -0
- toolkit/workspace/precompiled/LM_robustness.py +0 -74
- toolkit/workspace/precompiled/LM_switch.mpy +0 -0
- toolkit/workspace/precompiled/LM_system.mpy +0 -0
- toolkit/workspace/precompiled/LM_telegram.mpy +0 -0
- toolkit/workspace/precompiled/node_config.json +0 -1
- toolkit/workspace/precompiled/reset.mpy +0 -0
- /micrOS/source/{IO_esp32.py → modules/IO_esp32.py} +0 -0
- /micrOS/source/{IO_esp32c3.py → modules/IO_esp32c3.py} +0 -0
- /micrOS/source/{IO_esp32s2.py → modules/IO_esp32s2.py} +0 -0
- /micrOS/source/{IO_rp2.py → modules/IO_rp2.py} +0 -0
- /micrOS/source/{LM_gameOfLife.py → modules/LM_gameOfLife.py} +0 -0
- /micrOS/source/{LM_rgbcct.py → modules/LM_rgbcct.py} +0 -0
- /micrOS/source/{LM_rp2w.py → modules/LM_rp2w.py} +0 -0
- /micrOS/source/{LM_sdcard.py → modules/LM_sdcard.py} +0 -0
- /micrOS/source/{LM_sound_event.py → modules/LM_sound_event.py} +0 -0
- /micrOS/source/{LM_tinyrgb.py → modules/LM_tinyrgb.py} +0 -0
- /micrOS/source/{udashboard.js → web/udashboard.js} +0 -0
- /micrOS/source/{uwidgets.js → web/uwidgets.js} +0 -0
- /micrOS/source/{uwidgets_pro.js → web/uwidgets_pro.js} +0 -0
- {micrOSDevToolKit-2.9.1.dist-info → microsdevtoolkit-2.26.1.dist-info/licenses}/LICENSE +0 -0
- {micrOSDevToolKit-2.9.1.dist-info → microsdevtoolkit-2.26.1.dist-info}/top_level.txt +0 -0
- /toolkit/workspace/precompiled/{LM_rp2w.py → modules/LM_rp2w.py} +0 -0
- /toolkit/workspace/precompiled/{LM_sdcard.py → modules/LM_sdcard.py} +0 -0
- /toolkit/workspace/precompiled/{udashboard.js → web/udashboard.js} +0 -0
- /toolkit/workspace/precompiled/{uwidgets.js → web/uwidgets.js} +0 -0
- /toolkit/workspace/precompiled/{uwidgets_pro.js → web/uwidgets_pro.js} +0 -0
micrOS/source/Config.py
CHANGED
|
@@ -12,21 +12,28 @@ Designed by Marcell Ban aka BxNxM
|
|
|
12
12
|
#################################################################
|
|
13
13
|
# IMPORTS #
|
|
14
14
|
#################################################################
|
|
15
|
-
from os import remove
|
|
16
15
|
from re import search
|
|
17
16
|
from json import load, dump
|
|
17
|
+
from uos import remove
|
|
18
18
|
from utime import sleep
|
|
19
|
-
from Debug import DebugCfg, console_write,
|
|
19
|
+
from Debug import DebugCfg, console_write, syslog
|
|
20
|
+
from Files import OSPath, path_join, is_file
|
|
21
|
+
from uos import rename as move_file
|
|
20
22
|
try:
|
|
21
23
|
from microIO import set_pinmap
|
|
22
24
|
except:
|
|
23
|
-
|
|
25
|
+
syslog("[ERR] microIO import: set_pinmap")
|
|
24
26
|
set_pinmap = None
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
class Data:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
"""
|
|
31
|
+
Data class for managing configuration data.
|
|
32
|
+
"""
|
|
33
|
+
__slots__ = []
|
|
34
|
+
|
|
35
|
+
CONFIG_NAME = "node_config.json"
|
|
36
|
+
CONFIG_PATH = path_join(OSPath.CONFIG, CONFIG_NAME)
|
|
30
37
|
CONFIG_CACHE = {"version": "n/a",
|
|
31
38
|
"auth": False,
|
|
32
39
|
"staessid": "your_wifi_name",
|
|
@@ -64,17 +71,23 @@ class Data:
|
|
|
64
71
|
"boostmd": True,
|
|
65
72
|
"guimeta": "...", # special "offloaded" key indicator
|
|
66
73
|
"cstmpmap": "n/a",
|
|
67
|
-
"telegram": "n/a", # telegram bot token
|
|
68
74
|
"espnow": False}
|
|
69
75
|
|
|
70
76
|
@staticmethod
|
|
71
77
|
def init():
|
|
78
|
+
# Migrate config from / to /config
|
|
79
|
+
if is_file(Data.CONFIG_NAME):
|
|
80
|
+
console_write(f"[CONF] Migrate {Data.CONFIG_NAME} to {Data.CONFIG_PATH}")
|
|
81
|
+
move_file(Data.CONFIG_NAME, Data.CONFIG_PATH)
|
|
72
82
|
# Inject user config into template
|
|
73
83
|
Data.__inject_default_conf()
|
|
74
84
|
# [!!!] Init selected pinmap - default pinmap calculated by platform
|
|
75
|
-
if set_pinmap
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
if callable(set_pinmap):
|
|
86
|
+
try:
|
|
87
|
+
pinmap = set_pinmap(Data.CONFIG_CACHE['cstmpmap'])
|
|
88
|
+
console_write(f"[PIN MAP] {pinmap}")
|
|
89
|
+
except Exception as e:
|
|
90
|
+
console_write(f"\n[PIN MAP] !!! SETUP ERROR !!!: {e}\n")
|
|
78
91
|
# SET dbg based on config settings (inject user conf)
|
|
79
92
|
DebugCfg.DEBUG = Data.CONFIG_CACHE['dbg']
|
|
80
93
|
if DebugCfg.DEBUG:
|
|
@@ -91,12 +104,12 @@ class Data:
|
|
|
91
104
|
liveconf = Data.read_cfg_file(nosafe=True)
|
|
92
105
|
# Remove obsolete keys from conf
|
|
93
106
|
try:
|
|
94
|
-
remove('cleanup
|
|
107
|
+
remove('.cleanup') # Try to remove .cleanup (cleanup indicator by micrOSloader)
|
|
95
108
|
console_write("[CONF] Purge obsolete keys")
|
|
96
109
|
for key in (key for key in liveconf if key not in Data.CONFIG_CACHE):
|
|
97
110
|
liveconf.pop(key, None)
|
|
98
111
|
except Exception:
|
|
99
|
-
console_write("[CONF] SKIP obsolete keys check (no cleanup
|
|
112
|
+
console_write("[CONF] SKIP obsolete keys check (no .cleanup)")
|
|
100
113
|
# Merge template to live conf (store active conf in Data.CONFIG_CACHE)
|
|
101
114
|
Data.CONFIG_CACHE.update(liveconf)
|
|
102
115
|
console_write("[CONF] User config injection done")
|
|
@@ -105,7 +118,7 @@ class Data:
|
|
|
105
118
|
Data.write_cfg_file()
|
|
106
119
|
console_write("[CONF] Save conf successful")
|
|
107
120
|
except Exception as e:
|
|
108
|
-
|
|
121
|
+
syslog(f"[ERR] Save (__inject) conf failed: {e}")
|
|
109
122
|
finally:
|
|
110
123
|
del liveconf
|
|
111
124
|
|
|
@@ -123,7 +136,7 @@ class Data:
|
|
|
123
136
|
if nosafe:
|
|
124
137
|
break
|
|
125
138
|
sleep(0.2)
|
|
126
|
-
|
|
139
|
+
syslog(f'[ERR] read_cfg_file error: {e}')
|
|
127
140
|
# Return config cache
|
|
128
141
|
return conf
|
|
129
142
|
|
|
@@ -136,7 +149,7 @@ class Data:
|
|
|
136
149
|
dump(Data.CONFIG_CACHE, f)
|
|
137
150
|
break
|
|
138
151
|
except Exception as e:
|
|
139
|
-
|
|
152
|
+
syslog(f'[ERR] write_cfg_file {Data.CONFIG_PATH} (json): {e}')
|
|
140
153
|
sleep(0.2)
|
|
141
154
|
return True
|
|
142
155
|
|
|
@@ -145,20 +158,16 @@ class Data:
|
|
|
145
158
|
value_in_cfg = Data.CONFIG_CACHE[key]
|
|
146
159
|
try:
|
|
147
160
|
if isinstance(value_in_cfg, bool):
|
|
148
|
-
del value_in_cfg
|
|
149
161
|
if str(value).lower() == 'true':
|
|
150
162
|
return True
|
|
151
163
|
if str(value).lower() == 'false':
|
|
152
164
|
return False
|
|
153
165
|
raise Exception("type_handler type handling error")
|
|
154
166
|
if isinstance(value_in_cfg, str):
|
|
155
|
-
del value_in_cfg
|
|
156
167
|
return str(value)
|
|
157
168
|
if isinstance(value_in_cfg, int):
|
|
158
|
-
del value_in_cfg
|
|
159
169
|
return int(value)
|
|
160
170
|
if isinstance(value_in_cfg, float):
|
|
161
|
-
del value_in_cfg
|
|
162
171
|
return float(value)
|
|
163
172
|
except Exception as e:
|
|
164
173
|
console_write(f"Input value type error! {e}")
|
|
@@ -171,16 +180,17 @@ class Data:
|
|
|
171
180
|
These kind of parameters are not cached in memory
|
|
172
181
|
"""
|
|
173
182
|
# Write str value to file
|
|
183
|
+
offloaded_key = path_join(OSPath.CONFIG, f'.{key}.key')
|
|
174
184
|
if isinstance(value, str) and key in Data.CONFIG_CACHE:
|
|
175
185
|
try:
|
|
176
|
-
with open(
|
|
186
|
+
with open(offloaded_key, 'w') as f:
|
|
177
187
|
f.write(value)
|
|
178
188
|
return True
|
|
179
189
|
except Exception:
|
|
180
190
|
return False
|
|
181
191
|
# Read str value from file
|
|
182
192
|
try:
|
|
183
|
-
with open(
|
|
193
|
+
with open(offloaded_key, 'r') as f:
|
|
184
194
|
return f.read().strip()
|
|
185
195
|
except Exception:
|
|
186
196
|
# Return default value if key not exists
|
|
@@ -217,7 +227,7 @@ def cfgget(key=None):
|
|
|
217
227
|
return Data.disk_keys(key)
|
|
218
228
|
return val
|
|
219
229
|
except Exception as e:
|
|
220
|
-
|
|
230
|
+
syslog(f'[ERR] cfgget {key} error: {e}')
|
|
221
231
|
return None
|
|
222
232
|
|
|
223
233
|
def cfgput(key, value, type_check=False):
|
|
@@ -242,7 +252,7 @@ def cfgput(key, value, type_check=False):
|
|
|
242
252
|
del value
|
|
243
253
|
return True
|
|
244
254
|
except Exception as e:
|
|
245
|
-
|
|
255
|
+
syslog(f'[ERR] cfgput {key} error: {e}')
|
|
246
256
|
return False
|
|
247
257
|
|
|
248
258
|
#################################################################
|
micrOS/source/Debug.py
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
"""
|
|
2
|
+
micrOS Console and Log write interface implementations.
|
|
3
|
+
- with progress led feature, simple and custom
|
|
4
|
+
Designed by Marcell Ban aka BxNxM
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
from machine import Pin
|
|
2
8
|
try:
|
|
3
|
-
from Logger import syslog
|
|
9
|
+
from Logger import syslog as logger_syslog
|
|
4
10
|
except:
|
|
5
|
-
|
|
11
|
+
logger_syslog = None
|
|
6
12
|
try:
|
|
7
|
-
from microIO import resolve_pin, pinmap_search,
|
|
13
|
+
from microIO import resolve_pin, pinmap_search, register_pin
|
|
8
14
|
except:
|
|
9
|
-
|
|
15
|
+
pinmap_search = None
|
|
10
16
|
|
|
11
17
|
|
|
12
18
|
#############################################
|
|
@@ -17,110 +23,60 @@ except:
|
|
|
17
23
|
class DebugCfg:
|
|
18
24
|
DEBUG = True # DEBUG PRINT ON/OFF - SET FROM ConfigHandler
|
|
19
25
|
PLED_STEP = None # PROGRESS LED OBJECT - init in init_pled
|
|
20
|
-
NEO_WHEEL = None # NEOPIXEL (ws2812/esp32s3) color wheel object
|
|
21
|
-
COLOR_INDEX = 0 # APA102 TinyPico color wheel counter
|
|
22
26
|
|
|
23
27
|
@staticmethod
|
|
24
28
|
def init_pled():
|
|
25
29
|
# CALL FROM ConfigHandler
|
|
26
|
-
if
|
|
30
|
+
if pinmap_search is None:
|
|
27
31
|
# Check LogicalPins module loadable (robustness...)
|
|
28
32
|
return
|
|
29
|
-
micro_platform = detect_platform()
|
|
30
|
-
if micro_platform == "tinypico":
|
|
31
|
-
# Progress led for TinyPico
|
|
32
|
-
DebugCfg._init_apa102()
|
|
33
|
-
return
|
|
34
33
|
pled = pinmap_search('builtin')['builtin']
|
|
35
|
-
if pled is
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
if pled is None:
|
|
35
|
+
# No available builtin pin, skip pled init...
|
|
36
|
+
return
|
|
37
|
+
# CONFIGURE PROGRESS LED
|
|
38
|
+
if isinstance(pled, int):
|
|
39
|
+
# [MODE] Simple flashing progress LED
|
|
40
|
+
try:
|
|
41
|
+
# Progress led for esp32/etc
|
|
42
|
+
led_obj = Pin(abs(resolve_pin('builtin')), Pin.OUT)
|
|
43
|
+
if resolve_pin('builtin') < 0:
|
|
44
|
+
# Pin number start with (-), like -8 (means inverted output)
|
|
45
|
+
led_obj.value(1) # Turn OFF built-in LED state invert (1:OFF)
|
|
46
|
+
# Set function callback for step function (simple led - blink)
|
|
47
|
+
DebugCfg.PLED_STEP = lambda: led_obj.value(not led_obj.value()) # # double-blink: return None
|
|
48
|
+
except Exception as e:
|
|
49
|
+
syslog(f"[PLED] led error: {e}")
|
|
50
|
+
elif callable(pled):
|
|
51
|
+
# [MODE] OVERRIDE PROGRESS LED WITH CUSTOM step FUNCTION
|
|
52
|
+
DebugCfg.PLED_STEP = pled
|
|
53
|
+
DebugCfg._auto_register_pin()
|
|
54
|
+
else:
|
|
55
|
+
syslog(f"[WARN] pled type not supported: {pled}")
|
|
47
56
|
|
|
48
|
-
@staticmethod
|
|
49
|
-
def step():
|
|
50
|
-
"""
|
|
51
|
-
DEBUG LED FEEDBACK
|
|
52
|
-
- handle 3 types of builtin LEDs: analog, neopixel(ws2812), apa102
|
|
53
|
-
- automatic selection based on board type + builtin logical pin number
|
|
54
|
-
"""
|
|
55
|
-
try:
|
|
56
|
-
if callable(DebugCfg.PLED_STEP):
|
|
57
|
-
return DebugCfg.PLED_STEP() # Run step function (return None: double-blink OR True: no d-b)
|
|
58
|
-
except Exception as e:
|
|
59
|
-
errlog_add(f"[PLED] step error: {e}")
|
|
60
|
-
return True
|
|
61
57
|
|
|
62
58
|
@staticmethod
|
|
63
|
-
def
|
|
59
|
+
def _auto_register_pin():
|
|
64
60
|
try:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
led_obj.value(1) # Turn OFF built-in LED state invert (1:OFF)
|
|
69
|
-
# Set function callback for step function (simple led - blink)
|
|
70
|
-
DebugCfg.PLED_STEP = lambda: led_obj.value(not led_obj.value()) # # double-blink: return None
|
|
61
|
+
pin = DebugCfg.PLED_STEP(pin=True)
|
|
62
|
+
if isinstance(pin, int):
|
|
63
|
+
register_pin('builtin', pin)
|
|
71
64
|
except Exception as e:
|
|
72
|
-
|
|
65
|
+
syslog(f"[ERR] pled pin registration: {e}", console=False)
|
|
73
66
|
|
|
74
|
-
@staticmethod
|
|
75
|
-
def _init_apa102():
|
|
76
|
-
try:
|
|
77
|
-
from machine import SoftSPI
|
|
78
|
-
from dotstar import DotStar
|
|
79
|
-
from tinypico import DOTSTAR_CLK, DOTSTAR_DATA, SPI_MISO, set_dotstar_power, dotstar_color_wheel
|
|
80
|
-
spi = SoftSPI(sck=Pin(DOTSTAR_CLK), mosi=Pin(DOTSTAR_DATA), miso=Pin(SPI_MISO))
|
|
81
|
-
# Create a DotStar instance
|
|
82
|
-
dotstar = DotStar(spi, 1, brightness=0.4) # Just one DotStar, half brightness
|
|
83
|
-
# Turn on the power to the DotStar
|
|
84
|
-
set_dotstar_power(True)
|
|
85
|
-
DebugCfg.PLED_STEP = lambda: DebugCfg._step_apa102(led_obj=dotstar, color_wheel=dotstar_color_wheel)
|
|
86
|
-
except Exception as e:
|
|
87
|
-
errlog_add(f"[PLED] apa102 error: {e}")
|
|
88
|
-
|
|
89
|
-
@staticmethod
|
|
90
|
-
def _step_apa102(led_obj, color_wheel):
|
|
91
|
-
# Get the R,G,B values of the next colour
|
|
92
|
-
r, g, b = color_wheel(DebugCfg.COLOR_INDEX*2)
|
|
93
|
-
# Set the colour on the DOTSTAR
|
|
94
|
-
led_obj[0] = (int(r * 0.6), g, b, 0.4)
|
|
95
|
-
# Increase the wheel index
|
|
96
|
-
DebugCfg.COLOR_INDEX = 0 if DebugCfg.COLOR_INDEX > 1000 else DebugCfg.COLOR_INDEX + 2
|
|
97
|
-
return True # No double-blink
|
|
98
67
|
|
|
99
68
|
@staticmethod
|
|
100
|
-
def
|
|
69
|
+
def step():
|
|
70
|
+
"""
|
|
71
|
+
DEBUG LED FLASHING FEEDBACK
|
|
72
|
+
- handle step callback function execution
|
|
73
|
+
"""
|
|
101
74
|
try:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
led_obj = NeoPixel(neo_pin, 1)
|
|
105
|
-
DebugCfg.PLED_STEP = lambda: DebugCfg._step_ws2812(led_obj)
|
|
75
|
+
if callable(DebugCfg.PLED_STEP):
|
|
76
|
+
return DebugCfg.PLED_STEP() # Run step function (return None: double-blink OR True: no d-b)
|
|
106
77
|
except Exception as e:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
@staticmethod
|
|
110
|
-
def _step_ws2812(led_obj):
|
|
111
|
-
def _color_wheel():
|
|
112
|
-
while True:
|
|
113
|
-
yield 10, 0, 0
|
|
114
|
-
yield 5, 5, 0
|
|
115
|
-
yield 0, 10, 0
|
|
116
|
-
yield 0, 5, 5
|
|
117
|
-
yield 0, 0, 10
|
|
118
|
-
yield 5, 0, 5
|
|
119
|
-
if DebugCfg.NEO_WHEEL is None:
|
|
120
|
-
DebugCfg.NEO_WHEEL = _color_wheel()
|
|
121
|
-
led_obj[0] = next(DebugCfg.NEO_WHEEL)
|
|
122
|
-
led_obj.write()
|
|
123
|
-
return True # No double-blink
|
|
78
|
+
syslog(f"[PLED] step error: {e}")
|
|
79
|
+
return True
|
|
124
80
|
|
|
125
81
|
|
|
126
82
|
def console_write(msg):
|
|
@@ -131,10 +87,10 @@ def console_write(msg):
|
|
|
131
87
|
if analog is None:
|
|
132
88
|
DebugCfg.step() # Double-blink
|
|
133
89
|
except Exception as e:
|
|
134
|
-
|
|
90
|
+
syslog(f"[ERR] console_write: {e}", console=False)
|
|
135
91
|
|
|
136
92
|
|
|
137
|
-
def
|
|
93
|
+
def syslog(data, console=True):
|
|
138
94
|
"""
|
|
139
95
|
:param data: msg string / data
|
|
140
96
|
:param console: activate console_write (default: True)
|
|
@@ -142,4 +98,4 @@ def errlog_add(data, console=True):
|
|
|
142
98
|
"""
|
|
143
99
|
if console:
|
|
144
100
|
console_write(data)
|
|
145
|
-
return False if
|
|
101
|
+
return False if logger_syslog is None else logger_syslog(data)
|