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
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import ssl
|
|
2
3
|
|
|
4
|
+
ssl_context = ssl.create_default_context()
|
|
5
|
+
ssl_context.check_hostname = False # Disable hostname check
|
|
6
|
+
ssl_context.verify_mode = ssl.CERT_NONE # Disable certificate verification
|
|
7
|
+
|
|
8
|
+
class TimeoutError(Exception):
|
|
9
|
+
pass
|
|
3
10
|
|
|
4
11
|
def open_connection(host, port, ssl=False):
|
|
5
|
-
return asyncio.open_connection(host, port, ssl=ssl)
|
|
12
|
+
#return asyncio.open_connection(host, port, ssl=ssl)
|
|
13
|
+
return asyncio.open_connection(host, port, ssl=ssl_context if ssl else None)
|
|
6
14
|
|
|
7
15
|
|
|
8
16
|
class Lock(asyncio.Lock):
|
|
@@ -13,6 +21,10 @@ class Event(asyncio.Event):
|
|
|
13
21
|
pass
|
|
14
22
|
|
|
15
23
|
|
|
24
|
+
async def wait_for(fut, timeout):
|
|
25
|
+
return asyncio.wait_for(fut, timeout)
|
|
26
|
+
|
|
27
|
+
|
|
16
28
|
async def sleep(sec):
|
|
17
29
|
await asyncio.sleep(sec)
|
|
18
30
|
|
|
@@ -22,7 +34,26 @@ async def sleep_ms(ms):
|
|
|
22
34
|
|
|
23
35
|
|
|
24
36
|
def get_event_loop():
|
|
25
|
-
|
|
37
|
+
"""
|
|
38
|
+
Returns asyncio.EventLoop
|
|
39
|
+
"""
|
|
40
|
+
try:
|
|
41
|
+
# LEGACY: NOT WORKS FROM PYTHON 3.13
|
|
42
|
+
# BUT THIS IS THE MICROPYTHON WAY...
|
|
43
|
+
return asyncio.get_event_loop()
|
|
44
|
+
except Exception as e:
|
|
45
|
+
print(f"[SIM] get_event_loop exception: {e}")
|
|
46
|
+
# PYTHON <3.13 NEW WAY
|
|
47
|
+
try:
|
|
48
|
+
# Check running event loop
|
|
49
|
+
# MICROPYTHON HAS A SINGLE EVENT LOOP
|
|
50
|
+
loop = asyncio.get_running_loop()
|
|
51
|
+
except RuntimeError:
|
|
52
|
+
# Create event loop with new method
|
|
53
|
+
loop = asyncio.new_event_loop()
|
|
54
|
+
asyncio.set_event_loop(loop)
|
|
55
|
+
# return new "singleton" event loop
|
|
56
|
+
return loop
|
|
26
57
|
|
|
27
58
|
|
|
28
59
|
class Event:
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import stat as py_fs_stat
|
|
3
|
+
|
|
4
|
+
# https://docs.micropython.org/en/v1.9.2/pyboard/library/uos.html
|
|
5
|
+
# https://docs.micropython.org/en/v1.18/library/os.html
|
|
6
|
+
|
|
7
|
+
MOCK_SIM = False
|
|
8
|
+
|
|
9
|
+
def listdir(path=None):
|
|
10
|
+
if path is None:
|
|
11
|
+
return os.listdir()
|
|
12
|
+
path = __mock_sim_dir(path)
|
|
13
|
+
print(f"[uos.SIM] listdir: {path}")
|
|
14
|
+
return os.listdir(path)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def getcwd():
|
|
18
|
+
_cwd = os.getcwd()
|
|
19
|
+
if MOCK_SIM:
|
|
20
|
+
cwd = f"{_cwd}/../workspace/simulator/"
|
|
21
|
+
print(f"MOCK PATH: {cwd}")
|
|
22
|
+
elif "workspace/simulator" not in _cwd:
|
|
23
|
+
cwd = f"{_cwd}/toolkit/workspace/simulator/"
|
|
24
|
+
print(f"[uos.SIM] MOCK PATH: {_cwd} -> {cwd}")
|
|
25
|
+
else:
|
|
26
|
+
cwd = _cwd
|
|
27
|
+
return cwd
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def __mock_sim_dir(path):
|
|
31
|
+
"""
|
|
32
|
+
micropython sim hack
|
|
33
|
+
"""
|
|
34
|
+
cwd = getcwd()
|
|
35
|
+
cwd = cwd if cwd.endswith(os.sep) else f"{cwd}{os.sep}" # CHECK AND FIX CWD / ENDING
|
|
36
|
+
if MOCK_SIM or "workspace/simulator" not in path:
|
|
37
|
+
path = f"{cwd}{path}"
|
|
38
|
+
if MOCK_SIM:
|
|
39
|
+
print(f"[!!!] [uos.SIM][MOCK:{MOCK_SIM}] CWD PATH HACK: {path}")
|
|
40
|
+
return path
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def ilistdir(path):
|
|
44
|
+
buffer = []
|
|
45
|
+
for filename in listdir(path):
|
|
46
|
+
_name, _type, _inode = filename, stat(f"{path}/{filename}")[0], 0
|
|
47
|
+
print(f"[uos.SIM] ilistdir {path}: ({_name}, {_type:#x}, {_inode}")
|
|
48
|
+
buffer.append((_name, _type, _inode))
|
|
49
|
+
return tuple(buffer)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def mkdir(path):
|
|
53
|
+
print(f"[uos.SIM] mkdir: {path}")
|
|
54
|
+
return os.mkdir(path)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def remove(path):
|
|
58
|
+
path = __mock_sim_dir(path)
|
|
59
|
+
print(f"[uos.SIM] remove: {path}")
|
|
60
|
+
if "simulator" in path and path.replace('/', '').endswith('simulator'):
|
|
61
|
+
print(f"\t[uos.SIM] rmdir: Invalid path! {path}")
|
|
62
|
+
return False
|
|
63
|
+
return os.remove(path)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def rename(old_path, new_path):
|
|
67
|
+
old_path, new_path = __mock_sim_dir(old_path), __mock_sim_dir(new_path)
|
|
68
|
+
print(f"[uos.SIM] rename: {old_path} -> {new_path}")
|
|
69
|
+
os.rename(old_path, new_path)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _stat_eval(stat_result):
|
|
73
|
+
"""
|
|
74
|
+
micropython converter
|
|
75
|
+
"""
|
|
76
|
+
micropython_file_identifier = {'dir': 0x4000, 'file': 0x8000}
|
|
77
|
+
file_type_0 = 0x0 # file type
|
|
78
|
+
file_size_6 = py_fs_stat.ST_SIZE # bytes
|
|
79
|
+
file_time_8 = py_fs_stat.ST_MTIME # file modified time - only on some micropython ports
|
|
80
|
+
file_time_9 = py_fs_stat.ST_CTIME # creation time - only on some micropython ports
|
|
81
|
+
# Check if it's a file
|
|
82
|
+
if py_fs_stat.S_ISREG(stat_result.st_mode):
|
|
83
|
+
# FILE
|
|
84
|
+
file_type_0 = micropython_file_identifier['file']
|
|
85
|
+
if py_fs_stat.S_ISDIR(stat_result.st_mode):
|
|
86
|
+
# DIRECTORY
|
|
87
|
+
file_type_0 = micropython_file_identifier['dir']
|
|
88
|
+
# https://github.com/micropython/micropython-lib/blob/master/python-stdlib/stat/stat.py
|
|
89
|
+
# 0 1 2 3 4 5 6 7 8 9
|
|
90
|
+
return file_type_0, 0, 0, 0, 0, 0, file_size_6, 0, file_time_8, file_time_9
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def stat(path):
|
|
94
|
+
path = __mock_sim_dir(path)
|
|
95
|
+
stat_result = os.stat(path)
|
|
96
|
+
micropython_stat_result = _stat_eval(stat_result)
|
|
97
|
+
path_type = 'dir' if micropython_stat_result[0] & 0x4000 else 'file'
|
|
98
|
+
print(f"[uos.SIM] stat: {path} {path_type}({micropython_stat_result[0]:#x})")
|
|
99
|
+
return micropython_stat_result
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def rmdir(path):
|
|
103
|
+
path = __mock_sim_dir(path)
|
|
104
|
+
print(f"[uos.SIM] rmdir: {path}")
|
|
105
|
+
if "simulator" in path and path.replace('/', '').endswith('simulator'):
|
|
106
|
+
print(f"\t[uos.SIM] rmdir: Invalid path! {path}")
|
|
107
|
+
return False
|
|
108
|
+
return os.rmdir(path)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def statvfs(path=None):
|
|
112
|
+
if path is None:
|
|
113
|
+
return os.statvfs(__mock_sim_dir(path))
|
|
114
|
+
return os.statvfs(path)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def uname():
|
|
118
|
+
return os.uname()
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def sync():
|
|
122
|
+
print("[uos.SIM] sync - dummy")
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def urandom(n):
|
|
126
|
+
print(f"[uos.SIM] sync {n}")
|
|
127
|
+
return os.urandom(n)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def dupterm(stream_object):
|
|
131
|
+
print("[uos.SIM] dupterm - dummy")
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def mount(*args, **kwargs):
|
|
135
|
+
print("[uos.SIM] mount - dummy")
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def umount(*args, **kwargs):
|
|
139
|
+
print("[uos.SIM] unmount - dummy")
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
if __name__ == "__main__":
|
|
143
|
+
MOCK_SIM = True
|
|
144
|
+
print(f"SIM root (mock: {MOCK_SIM}): {__mock_sim_dir('/')}\ngetcwd: {getcwd()}")
|
|
145
|
+
print(listdir("/"))
|
|
146
|
+
print(stat('/'))
|
|
147
|
+
print(ilistdir('/'))
|
toolkit/socketClient.py
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import sys
|
|
5
5
|
import socket
|
|
6
6
|
import os
|
|
7
|
-
import select
|
|
8
7
|
import time
|
|
9
8
|
import json
|
|
10
9
|
import threading
|
|
@@ -186,8 +185,8 @@ class ConnectionData:
|
|
|
186
185
|
return None, None, None, None
|
|
187
186
|
|
|
188
187
|
@staticmethod
|
|
189
|
-
def nodes_status():
|
|
190
|
-
spr_offset1 =
|
|
188
|
+
def nodes_status(feature_stat=True):
|
|
189
|
+
spr_offset1 = 25
|
|
191
190
|
spr_offset2 = 57
|
|
192
191
|
|
|
193
192
|
def _dev_status(ip, port, fuid, uid):
|
|
@@ -200,6 +199,10 @@ class ConnectionData:
|
|
|
200
199
|
Colors.WARN, Colors.NC)
|
|
201
200
|
version_data = '<n/a>'
|
|
202
201
|
elapsed_time = 'n/a'
|
|
202
|
+
webui_state = 'n/a'
|
|
203
|
+
espnow_state = 'n/a'
|
|
204
|
+
cron_state = 'n/a'
|
|
205
|
+
timirq_state = 'n/a'
|
|
203
206
|
online_ip = None
|
|
204
207
|
|
|
205
208
|
# is online
|
|
@@ -207,25 +210,40 @@ class ConnectionData:
|
|
|
207
210
|
# get version data
|
|
208
211
|
online_ip = ip
|
|
209
212
|
try:
|
|
213
|
+
connection = SocketDictClient(host=ip, port=port, silent_mode=True, tout=3)
|
|
214
|
+
# Get version and elapsed time data
|
|
210
215
|
start_comm = time.time()
|
|
211
|
-
version_data =
|
|
216
|
+
version_data = connection.non_interactive(['version'])
|
|
212
217
|
elapsed_time = "{:.3f}".format(time.time() - start_comm)
|
|
213
|
-
|
|
214
|
-
|
|
218
|
+
if feature_stat:
|
|
219
|
+
# Get active features info
|
|
220
|
+
webui_state = connection.non_interactive(['conf', 'webui'])
|
|
221
|
+
espnow_state = connection.non_interactive(['conf', 'espnow'])
|
|
222
|
+
cron_state = connection.non_interactive(['conf', 'cron'])
|
|
223
|
+
timirq_state = connection.non_interactive(['conf', 'timirq'])
|
|
224
|
+
except Exception as e:
|
|
225
|
+
print(f"Getting device version {fuid}:{uid} error: {e}")
|
|
215
226
|
|
|
216
227
|
# Generate line printout
|
|
217
228
|
base_info = "{uid}{spr1}{fuid}".format(uid=uid, spr1=spacer1, fuid=fuid)
|
|
218
229
|
spacer1 = " " * (spr_offset2 - len(base_info))
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
230
|
+
spacer2 = "\t" if len(version_data) > 7 else "\t\t"
|
|
231
|
+
feature_info = ""
|
|
232
|
+
if feature_stat:
|
|
233
|
+
_on_str = f"{Colors.OKGREEN}{Colors.BOLD}ON {Colors.NC}"
|
|
234
|
+
_off_str = f"{Colors.BOLD}OFF{Colors.NC}"
|
|
235
|
+
_fspacer = " "*6
|
|
236
|
+
bool2str = lambda x: _on_str if x.strip() == "True" else _off_str if x != "n/a" else x
|
|
237
|
+
feature_info = f"\t\t{bool2str(webui_state)}{_fspacer}{bool2str(espnow_state)}{_fspacer}{bool2str(cron_state)}{_fspacer}{bool2str(timirq_state)}"
|
|
238
|
+
data_line_str = f"{base_info}{spacer1}{ip}\t{is_online}\t\t{version_data}{spacer2}{elapsed_time}{feature_info}"
|
|
222
239
|
return data_line_str, online_ip
|
|
223
240
|
return None
|
|
224
241
|
|
|
225
242
|
nodes_dict = ConnectionData.read_micrOS_device_cache()
|
|
226
|
-
spacer1 = " " * (spr_offset1 -
|
|
227
|
-
|
|
228
|
-
|
|
243
|
+
spacer1 = " " * (spr_offset1 - 8)
|
|
244
|
+
feature_header_str = "\t[WEBUI | ESPNOW | CRON | TIMIRQ]" if feature_stat else ""
|
|
245
|
+
print("{cols}[ UID ]{spr1}[ FUID ]\t\t[ IP ]\t\t[ STATUS ]\t[ VERSION ]\t[COMM SEC]{features}{cole}"
|
|
246
|
+
.format(spr1=spacer1, cols=Colors.OKBLUE + Colors.BOLD, features=feature_header_str, cole=Colors.NC))
|
|
229
247
|
|
|
230
248
|
# Start parallel status queries
|
|
231
249
|
query_list = []
|
|
@@ -341,7 +359,7 @@ class SocketDictClient:
|
|
|
341
359
|
#########################################################
|
|
342
360
|
|
|
343
361
|
|
|
344
|
-
def main(args, host='127.0.0.1', port=9008, timeout=
|
|
362
|
+
def main(args, host='127.0.0.1', port=9008, timeout=5, pwd=None, verbose=False):
|
|
345
363
|
""" main connection wrapper function """
|
|
346
364
|
answer_msg = None
|
|
347
365
|
|
|
@@ -388,7 +406,6 @@ def socket_commandline_args(arg_list):
|
|
|
388
406
|
arg = 'status'
|
|
389
407
|
keywords = list(return_action_dict.keys())
|
|
390
408
|
if arg in keywords:
|
|
391
|
-
print(arg)
|
|
392
409
|
if return_action_dict[arg] is None:
|
|
393
410
|
return_action_dict[arg] = arg_list[i+1]
|
|
394
411
|
_skip = True
|
|
@@ -418,25 +435,28 @@ def socket_commandline_args(arg_list):
|
|
|
418
435
|
print("--list / list\t\t- list mocrOS devices")
|
|
419
436
|
print("HINT:\t\t\t- In non interactive mode just list command(s) as last parameters.\n\t\t\t"
|
|
420
437
|
"Also you can pipe commands with <a> separator.")
|
|
421
|
-
print("HINT:\t\t\t\t- Example: --dev node01 system clock")
|
|
422
|
-
print("HINT:\t\t\t\t- Example: --dev node01 --pwd ADmin123 system clock")
|
|
438
|
+
print("HINT:\t\t\t\t- Example: --dev node01 'system clock'")
|
|
439
|
+
print("HINT:\t\t\t\t- Example: --dev node01 --pwd ADmin123 'system clock'")
|
|
423
440
|
sys.exit(0)
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
return
|
|
441
|
+
result = command_buffer, return_action_dict
|
|
442
|
+
print(f"SocketClient: {result}")
|
|
443
|
+
return result
|
|
427
444
|
|
|
428
445
|
|
|
429
|
-
def run(arg_list=
|
|
446
|
+
def run(arg_list=None, timeout=10, verbose=False):
|
|
430
447
|
""" Run from code
|
|
431
448
|
- Handles extra command line arguments
|
|
432
449
|
"""
|
|
450
|
+
if arg_list is None:
|
|
451
|
+
arg_list = []
|
|
433
452
|
#print("Socket run (raw): {}".format(arg_list))
|
|
434
453
|
args, action = socket_commandline_args(arg_list)
|
|
435
454
|
host, port, fid, uid = ConnectionData.auto_execute(search=action['search'], status=action['status'], dev=action['device_tag'])
|
|
436
455
|
output = False, ''
|
|
437
456
|
try:
|
|
438
457
|
#print("Socket run (args): {}".format(args))
|
|
439
|
-
|
|
458
|
+
verbose = verbose or action['verbose']
|
|
459
|
+
output = main(args, host=host, port=port, timeout=timeout, pwd=action['password'], verbose=verbose)
|
|
440
460
|
except Exception as e:
|
|
441
461
|
if "TimeOut" in str(e):
|
|
442
462
|
print("Resolve device by host ... {}.local {}:{}:{}".format(fid, host, port, uid))
|
|
@@ -451,5 +471,5 @@ def connection_metrics(host):
|
|
|
451
471
|
|
|
452
472
|
if __name__ == "__main__":
|
|
453
473
|
"""Runs in individual - direct execution mode"""
|
|
454
|
-
|
|
455
|
-
run(arg_list=
|
|
474
|
+
arglist = sys.argv[1:]
|
|
475
|
+
run(arg_list=arglist)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
4
|
Generic webhook for socketClient that can invoke LoadModule calls remotely from any device.
|
|
5
|
-
Example: http://10.0.1.61:
|
|
5
|
+
Example: http://10.0.1.61:5005/webhooks/generic/TinyDevBoard+system+clock
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import sys, os
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.24.1
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from microIO import
|
|
1
|
+
from microIO import bind_pin, pinmap_search
|
|
2
2
|
|
|
3
3
|
#########################################
|
|
4
4
|
# ANALOG DIMMER CONTROLLER PARAMS #
|
|
@@ -15,8 +15,8 @@ def __l9110_init():
|
|
|
15
15
|
global __L9110_OBJS
|
|
16
16
|
if len(__L9110_OBJS) == 0:
|
|
17
17
|
from machine import Pin, PWM
|
|
18
|
-
__L9110_OBJS.append(PWM(Pin(
|
|
19
|
-
__L9110_OBJS.append(PWM(Pin(
|
|
18
|
+
__L9110_OBJS.append(PWM(Pin(bind_pin('l9110dir_1')), freq=1024))
|
|
19
|
+
__L9110_OBJS.append(PWM(Pin(bind_pin('l9110dir_2')), freq=1024))
|
|
20
20
|
__L9110_OBJS[0].duty(0) # Set default speed (PWM)
|
|
21
21
|
__L9110_OBJS[1].duty(0) # Set default speed (PWM)
|
|
22
22
|
return __L9110_OBJS
|
|
Binary file
|
|
@@ -2,7 +2,7 @@ from micropython import const
|
|
|
2
2
|
import ustruct
|
|
3
3
|
import utime
|
|
4
4
|
from machine import I2C, Pin
|
|
5
|
-
from microIO import
|
|
5
|
+
from microIO import bind_pin, pinmap_search
|
|
6
6
|
|
|
7
7
|
__TOF_OBJ = None
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ class TimeoutError(RuntimeError):
|
|
|
31
31
|
|
|
32
32
|
class VL53L0X:
|
|
33
33
|
def __init__(self, address=57):
|
|
34
|
-
self.i2c = I2C(-1, Pin(
|
|
34
|
+
self.i2c = I2C(-1, Pin(bind_pin('i2c_scl')), Pin(bind_pin('i2c_sda')), freq=9600)
|
|
35
35
|
self.address = address
|
|
36
36
|
self.init()
|
|
37
37
|
self._started = False
|
|
@@ -343,7 +343,7 @@ class VL53L0X:
|
|
|
343
343
|
|
|
344
344
|
def measure():
|
|
345
345
|
"""
|
|
346
|
-
Experimental
|
|
346
|
+
Experimental - Time of Flight Distance Sensor
|
|
347
347
|
"""
|
|
348
348
|
global __TOF_OBJ
|
|
349
349
|
if __TOF_OBJ is None:
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from Espnow import ESPNowSS
|
|
2
|
+
ESPNOW = ESPNowSS()
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def send(peer:bytes|str, cmd:str='modules'):
|
|
6
|
+
"""
|
|
7
|
+
Send message to peer (by mac address)
|
|
8
|
+
:param peer: mac address of espnow device
|
|
9
|
+
:param cmd: message string/load module call
|
|
10
|
+
"""
|
|
11
|
+
return ESPNOW.send(peer, cmd)
|
|
12
|
+
|
|
13
|
+
def stats():
|
|
14
|
+
"""
|
|
15
|
+
Get ESPNOW stats
|
|
16
|
+
"""
|
|
17
|
+
return ESPNOW.stats()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def members():
|
|
21
|
+
"""
|
|
22
|
+
Get ESPNow devices
|
|
23
|
+
"""
|
|
24
|
+
return ESPNOW.members()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def handshake(peer:bytes|str):
|
|
28
|
+
"""
|
|
29
|
+
Handshake with ESPNow Peer
|
|
30
|
+
:param peer: mac address of espnow device
|
|
31
|
+
- device name detection
|
|
32
|
+
- address:name caching
|
|
33
|
+
"""
|
|
34
|
+
return ESPNOW.handshake(peer)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def remove(peer:bytes):
|
|
38
|
+
"""
|
|
39
|
+
Remove peer by binary mac address
|
|
40
|
+
:param peer: binary mac address of espnow device
|
|
41
|
+
"""
|
|
42
|
+
return ESPNOW.remove_peer(peer)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def help():
|
|
46
|
+
"""
|
|
47
|
+
ESPNOW sender/receiver with LM execution
|
|
48
|
+
"""
|
|
49
|
+
return ('handshake peer=<mac-address>',
|
|
50
|
+
'send peer=<peer-name> cmd="hello"',
|
|
51
|
+
'remove peer=<binary-mac-address>',
|
|
52
|
+
'stats',
|
|
53
|
+
'members')
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from microIO import
|
|
1
|
+
from microIO import bind_pin, pinmap_search
|
|
2
2
|
|
|
3
3
|
__I2C = None
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ def __init():
|
|
|
7
7
|
global __I2C
|
|
8
8
|
if __I2C is None:
|
|
9
9
|
from machine import Pin, I2C
|
|
10
|
-
__I2C = I2C(-1, Pin(
|
|
10
|
+
__I2C = I2C(-1, Pin(bind_pin('i2c_scl')), Pin(bind_pin('i2c_sda')))
|
|
11
11
|
return __I2C
|
|
12
12
|
|
|
13
13
|
|
|
@@ -24,8 +24,9 @@ def discover():
|
|
|
24
24
|
"""
|
|
25
25
|
Discover devices
|
|
26
26
|
"""
|
|
27
|
-
known_addresses = {hex(0x0A): "
|
|
28
|
-
hex(0x76): "
|
|
27
|
+
known_addresses = {hex(0x0A): "TRACKBALL", hex(0x3c): "OLED",
|
|
28
|
+
hex(0x76): "BME280", hex(0x10): 'VEML7700',
|
|
29
|
+
hex(0x6b): "QMI8658", hex(0x29): 'TCS3472'}
|
|
29
30
|
devices = scan()
|
|
30
31
|
output = {"unknown": []}
|
|
31
32
|
for k in devices:
|
|
Binary file
|