micrOSDevToolKit 2.1.5__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.
Files changed (400) hide show
  1. env/driver_cp210x/.DS_Store +0 -0
  2. env/driver_cp210x/macOS_VCP_Driver/SiLabsUSBDriverDisk.dmg +0 -0
  3. env/driver_cp210x/macOS_VCP_Driver/macOS_VCP_Driver_Release_Notes.txt +17 -1
  4. micrOS/micropython/esp32-20251209-v1.27.0.bin +0 -0
  5. micrOS/micropython/esp32c3-20251209-v1.27.0.bin +0 -0
  6. micrOS/micropython/esp32c6-20251209-v1.27.0.bin +0 -0
  7. micrOS/micropython/esp32s2-20251209-v1.27.0.bin +0 -0
  8. micrOS/micropython/esp32s2-LOLIN_MINI-20251209-v1.27.0.bin +0 -0
  9. micrOS/micropython/esp32s3-4MBflash-20241129-v1.24.1.bin +0 -0
  10. micrOS/micropython/esp32s3-8MBflash-20251209-v1.27.0.bin +0 -0
  11. micrOS/micropython/esp32s3_spiram_oct-20251209-v1.27.0.bin +0 -0
  12. micrOS/micropython/rpi-pico-w-20251209-v1.27.0.uf2 +0 -0
  13. micrOS/micropython/tinypico-20251209-v1.27.0.bin +0 -0
  14. micrOS/release_info/micrOS_ReleaseInfo/system_analysis_sum.json +191 -151
  15. micrOS/source/Auth.py +37 -0
  16. micrOS/source/Common.py +376 -102
  17. micrOS/source/Config.py +55 -25
  18. micrOS/source/Debug.py +54 -193
  19. micrOS/source/Espnow.py +404 -0
  20. micrOS/source/Files.py +207 -0
  21. micrOS/source/Hooks.py +88 -16
  22. micrOS/source/InterConnect.py +130 -46
  23. micrOS/source/Interrupts.py +8 -8
  24. micrOS/source/Logger.py +131 -0
  25. micrOS/source/Network.py +41 -21
  26. micrOS/source/Notify.py +74 -198
  27. micrOS/source/Pacman.py +326 -0
  28. micrOS/source/Scheduler.py +18 -55
  29. micrOS/source/Server.py +84 -217
  30. micrOS/source/Shell.py +103 -93
  31. micrOS/source/Tasks.py +239 -173
  32. micrOS/source/Time.py +21 -22
  33. micrOS/source/Types.py +89 -54
  34. micrOS/source/Web.py +485 -0
  35. micrOS/source/__pycache__/Common.cpython-312.pyc +0 -0
  36. micrOS/source/__pycache__/Debug.cpython-312.pyc +0 -0
  37. micrOS/source/__pycache__/Files.cpython-312.pyc +0 -0
  38. micrOS/source/__pycache__/Logger.cpython-312.pyc +0 -0
  39. micrOS/source/__pycache__/Scheduler.cpython-312.pyc +0 -0
  40. micrOS/source/__pycache__/Server.cpython-312.pyc +0 -0
  41. micrOS/source/__pycache__/Shell.cpython-312.pyc +0 -0
  42. micrOS/source/__pycache__/replhelper.cpython-312.pyc +0 -0
  43. micrOS/source/helpers.py +132 -0
  44. micrOS/source/micrOS.py +25 -21
  45. micrOS/source/micrOSloader.py +14 -23
  46. micrOS/source/microIO.py +94 -57
  47. toolkit/simulator_lib/LP_darwin.py → micrOS/source/modules/IO_esp32.py +22 -11
  48. micrOS/source/{IO_esp32c3.py → modules/IO_esp32c3.py} +6 -1
  49. micrOS/source/modules/IO_esp32c6.py +38 -0
  50. micrOS/source/{IO_esp32s2.py → modules/IO_esp32s2.py} +6 -1
  51. micrOS/source/{IO_esp32s3.py → modules/IO_esp32s3.py} +43 -2
  52. micrOS/source/modules/IO_m5stamp.py +86 -0
  53. micrOS/source/{IO_qtpy.py → modules/IO_qtpy.py} +28 -18
  54. micrOS/source/{IO_tinypico.py → modules/IO_tinypico.py} +48 -3
  55. micrOS/source/modules/LM_L298N.py +161 -0
  56. {toolkit/workspace/precompiled → micrOS/source/modules}/LM_L9110_DCmotor.py +4 -4
  57. micrOS/source/{LM_OV2640.py → modules/LM_OV2640.py} +53 -42
  58. micrOS/source/{LM_VL53L0X.py → modules/LM_VL53L0X.py} +5 -5
  59. micrOS/source/{LM_aht10.py → modules/LM_aht10.py} +12 -4
  60. micrOS/source/{LM_bme280.py → modules/LM_bme280.py} +13 -25
  61. micrOS/source/{LM_buzzer.py → modules/LM_buzzer.py} +42 -40
  62. micrOS/source/{LM_cct.py → modules/LM_cct.py} +22 -27
  63. micrOS/source/modules/LM_cluster.py +255 -0
  64. micrOS/source/{LM_co2.py → modules/LM_co2.py} +13 -6
  65. micrOS/source/{LM_dht11.py → modules/LM_dht11.py} +13 -29
  66. micrOS/source/{LM_dht22.py → modules/LM_dht22.py} +13 -28
  67. micrOS/source/{LM_dimmer.py → modules/LM_dimmer.py} +19 -16
  68. micrOS/source/modules/LM_distance.py +135 -0
  69. micrOS/source/{LM_ds18.py → modules/LM_ds18.py} +12 -4
  70. micrOS/source/{LM_esp32.py → modules/LM_esp32.py} +16 -4
  71. micrOS/source/modules/LM_espnow.py +53 -0
  72. micrOS/source/modules/LM_fileserver.py +265 -0
  73. micrOS/source/{LM_gameOfLife.py → modules/LM_gameOfLife.py} +5 -5
  74. micrOS/source/{LM_genIO.py → modules/LM_genIO.py} +49 -35
  75. micrOS/source/modules/LM_haptic.py +111 -0
  76. micrOS/source/modules/LM_i2c.py +61 -0
  77. micrOS/source/{LM_i2s_mic.py → modules/LM_i2s_mic.py} +20 -23
  78. micrOS/source/{LM_ld2410.py → modules/LM_ld2410.py} +3 -3
  79. micrOS/source/{LM_light_sensor.py → modules/LM_light_sensor.py} +22 -26
  80. micrOS/source/modules/LM_mh_z19c.py +198 -0
  81. micrOS/source/modules/LM_neoeffects.py +284 -0
  82. micrOS/source/{LM_neopixel.py → modules/LM_neopixel.py} +26 -31
  83. micrOS/source/{LM_oled.py → modules/LM_oled.py} +28 -20
  84. micrOS/source/{LM_oled_sh1106.py → modules/LM_oled_sh1106.py} +28 -24
  85. micrOS/source/{LM_oled_ui.py → modules/LM_oled_ui.py} +132 -174
  86. micrOS/source/modules/LM_pacman.py +320 -0
  87. micrOS/source/{LM_presence.py → modules/LM_presence.py} +24 -36
  88. micrOS/source/modules/LM_qmi8658.py +204 -0
  89. micrOS/source/{LM_rencoder.py → modules/LM_rencoder.py} +40 -11
  90. micrOS/source/modules/LM_rest.py +81 -0
  91. micrOS/source/{LM_rgb.py → modules/LM_rgb.py} +25 -34
  92. micrOS/source/{LM_rgbcct.py → modules/LM_rgbcct.py} +5 -5
  93. micrOS/source/{LM_roboarm.py → modules/LM_roboarm.py} +37 -45
  94. micrOS/source/modules/LM_robustness.py +137 -0
  95. micrOS/source/{LM_rp2w.py → modules/LM_rp2w.py} +3 -0
  96. micrOS/source/{LM_sdcard.py → modules/LM_sdcard.py} +3 -0
  97. micrOS/source/{LM_servo.py → modules/LM_servo.py} +4 -4
  98. micrOS/source/modules/LM_sound_event.py +751 -0
  99. micrOS/source/{LM_stepper.py → modules/LM_stepper.py} +8 -8
  100. micrOS/source/{LM_switch.py → modules/LM_switch.py} +21 -18
  101. micrOS/source/{LM_system.py → modules/LM_system.py} +96 -59
  102. micrOS/source/modules/LM_tcs3472.py +187 -0
  103. micrOS/source/modules/LM_telegram.py +388 -0
  104. micrOS/source/modules/LM_trackball.py +287 -0
  105. micrOS/source/modules/LM_veml7700.py +159 -0
  106. micrOS/source/modules/LM_web.py +38 -0
  107. micrOS/source/urequests.py +204 -91
  108. {toolkit/workspace/precompiled → micrOS/source/web}/dashboard.html +9 -4
  109. micrOS/source/web/editor.js +440 -0
  110. micrOS/source/web/filesui.html +178 -0
  111. micrOS/source/web/filesui.js +338 -0
  112. micrOS/source/{index.html → web/index.html} +44 -2
  113. micrOS/source/web/uapi.js +103 -0
  114. micrOS/source/web/udashboard.js +129 -0
  115. micrOS/source/web/ustyle.css +55 -0
  116. micrOS/source/web/uwidgets.js +172 -0
  117. micrOS/source/web/uwidgets_pro.js +99 -0
  118. micrOS/utests/__init__.py +0 -0
  119. micrOS/utests/test_scheduler.py +435 -0
  120. {micrOSDevToolKit-2.1.5.data → microsdevtoolkit-2.26.1.data}/scripts/devToolKit.py +47 -4
  121. {micrOSDevToolKit-2.1.5.dist-info → microsdevtoolkit-2.26.1.dist-info}/METADATA +392 -279
  122. microsdevtoolkit-2.26.1.dist-info/RECORD +396 -0
  123. {micrOSDevToolKit-2.1.5.dist-info → microsdevtoolkit-2.26.1.dist-info}/WHEEL +1 -1
  124. toolkit/DevEnvCompile.py +63 -33
  125. toolkit/DevEnvOTA.py +72 -22
  126. toolkit/DevEnvUSB.py +147 -77
  127. toolkit/Gateway.py +9 -9
  128. toolkit/LM_to_compile.dat +12 -4
  129. toolkit/MicrOSDevEnv.py +129 -51
  130. toolkit/WebRepl.py +73 -0
  131. toolkit/dashboard_apps/BackupRestore.py +171 -0
  132. toolkit/dashboard_apps/CCTDemo.py +12 -17
  133. toolkit/dashboard_apps/CCTTest.py +20 -24
  134. toolkit/dashboard_apps/CamStream.py +2 -6
  135. toolkit/dashboard_apps/CatGame.py +14 -16
  136. toolkit/dashboard_apps/Dimmer.py +11 -21
  137. toolkit/dashboard_apps/GetVersion.py +11 -19
  138. toolkit/dashboard_apps/MicrophoneTest.py +2 -7
  139. toolkit/dashboard_apps/NeoEffectsDemo.py +22 -35
  140. toolkit/dashboard_apps/NeopixelTest.py +20 -25
  141. toolkit/dashboard_apps/PresenceTest.py +2 -8
  142. toolkit/dashboard_apps/QMI8685_GYRO.py +68 -0
  143. toolkit/dashboard_apps/RGBTest.py +20 -24
  144. toolkit/dashboard_apps/RoboArm.py +24 -32
  145. toolkit/dashboard_apps/SED_test.py +10 -14
  146. toolkit/dashboard_apps/SensorsTest.py +61 -0
  147. toolkit/dashboard_apps/SystemTest.py +219 -117
  148. toolkit/dashboard_apps/Template_app.py +12 -19
  149. toolkit/dashboard_apps/_app_base.py +34 -0
  150. toolkit/dashboard_apps/_gyro_visualizer.py +78 -0
  151. toolkit/dashboard_apps/uLightDemo.py +15 -24
  152. toolkit/index.html +6 -5
  153. toolkit/lib/LocalMachine.py +6 -1
  154. toolkit/lib/MicrosFiles.py +46 -0
  155. toolkit/lib/Repository.py +64 -0
  156. toolkit/lib/TerminalColors.py +4 -0
  157. toolkit/lib/macroScript.py +371 -0
  158. toolkit/lib/micrOSClient.py +124 -51
  159. toolkit/lib/micrOSClientHistory.py +156 -0
  160. toolkit/lib/pip_package_installer.py +31 -4
  161. toolkit/micrOSdashboard.py +16 -21
  162. toolkit/micrOSlint.py +28 -10
  163. toolkit/simulator_lib/.DS_Store +0 -0
  164. micrOS/source/IO_esp32.py → toolkit/simulator_lib/IO_darwin.py +3 -0
  165. toolkit/simulator_lib/__pycache__/IO_darwin.cpython-312.pyc +0 -0
  166. toolkit/simulator_lib/__pycache__/aioespnow.cpython-312.pyc +0 -0
  167. toolkit/simulator_lib/__pycache__/camera.cpython-312.pyc +0 -0
  168. toolkit/simulator_lib/__pycache__/framebuf.cpython-312.pyc +0 -0
  169. toolkit/simulator_lib/__pycache__/machine.cpython-312.pyc +0 -0
  170. toolkit/simulator_lib/__pycache__/micropython.cpython-312.pyc +0 -0
  171. toolkit/simulator_lib/__pycache__/mip.cpython-312.pyc +0 -0
  172. toolkit/simulator_lib/__pycache__/neopixel.cpython-312.pyc +0 -0
  173. toolkit/simulator_lib/__pycache__/network.cpython-312.pyc +0 -0
  174. toolkit/simulator_lib/__pycache__/sim_common.cpython-312.pyc +0 -0
  175. toolkit/simulator_lib/__pycache__/simgc.cpython-312.pyc +0 -0
  176. toolkit/simulator_lib/__pycache__/simulator.cpython-312.pyc +0 -0
  177. toolkit/simulator_lib/__pycache__/uasyncio.cpython-312.pyc +0 -0
  178. toolkit/simulator_lib/__pycache__/uos.cpython-312.pyc +0 -0
  179. toolkit/simulator_lib/__pycache__/urandom.cpython-312.pyc +0 -0
  180. toolkit/simulator_lib/__pycache__/usocket.cpython-312.pyc +0 -0
  181. toolkit/simulator_lib/__pycache__/ussl.cpython-312.pyc +0 -0
  182. toolkit/simulator_lib/aioespnow.py +28 -0
  183. toolkit/simulator_lib/camera.py +84 -0
  184. toolkit/simulator_lib/dht.py +1 -1
  185. toolkit/simulator_lib/framebuf.py +49 -1
  186. toolkit/simulator_lib/machine.py +32 -2
  187. toolkit/simulator_lib/micropython.py +3 -3
  188. toolkit/simulator_lib/mip.py +165 -0
  189. toolkit/simulator_lib/neopixel.py +3 -2
  190. toolkit/simulator_lib/network.py +2 -1
  191. toolkit/simulator_lib/node_config.json +2 -3
  192. toolkit/simulator_lib/ntptime.py +1 -1
  193. toolkit/simulator_lib/{sim_console.py → sim_common.py} +2 -3
  194. toolkit/simulator_lib/simgc.py +6 -2
  195. toolkit/simulator_lib/simulator.py +138 -46
  196. toolkit/simulator_lib/uasyncio.py +34 -3
  197. toolkit/simulator_lib/uos.py +147 -0
  198. toolkit/simulator_lib/urandom.py +4 -0
  199. toolkit/simulator_lib/usocket.py +5 -1
  200. toolkit/simulator_lib/view01.jpg +0 -0
  201. toolkit/simulator_lib/view02.jpg +0 -0
  202. toolkit/socketClient.py +43 -23
  203. toolkit/user_data/webhooks/generic.py +1 -1
  204. toolkit/user_data/webhooks/macro.py +44 -0
  205. toolkit/user_data/webhooks/template.macro +20 -0
  206. toolkit/user_data/webhooks/template.py +1 -1
  207. toolkit/workspace/precompiled/Auth.mpy +0 -0
  208. toolkit/workspace/precompiled/Common.mpy +0 -0
  209. toolkit/workspace/precompiled/Config.mpy +0 -0
  210. toolkit/workspace/precompiled/Debug.mpy +0 -0
  211. toolkit/workspace/precompiled/Espnow.mpy +0 -0
  212. toolkit/workspace/precompiled/Files.mpy +0 -0
  213. toolkit/workspace/precompiled/Hooks.mpy +0 -0
  214. toolkit/workspace/precompiled/InterConnect.mpy +0 -0
  215. toolkit/workspace/precompiled/Interrupts.mpy +0 -0
  216. toolkit/workspace/precompiled/Logger.mpy +0 -0
  217. toolkit/workspace/precompiled/Network.mpy +0 -0
  218. toolkit/workspace/precompiled/Notify.mpy +0 -0
  219. toolkit/workspace/precompiled/Pacman.mpy +0 -0
  220. toolkit/workspace/precompiled/Scheduler.mpy +0 -0
  221. toolkit/workspace/precompiled/Server.mpy +0 -0
  222. toolkit/workspace/precompiled/Shell.mpy +0 -0
  223. toolkit/workspace/precompiled/Tasks.mpy +0 -0
  224. toolkit/workspace/precompiled/Time.mpy +0 -0
  225. toolkit/workspace/precompiled/Types.mpy +0 -0
  226. toolkit/workspace/precompiled/Web.mpy +0 -0
  227. toolkit/workspace/precompiled/_mpy.version +1 -1
  228. toolkit/workspace/precompiled/config/_git.keep +0 -0
  229. toolkit/workspace/precompiled/helpers.mpy +0 -0
  230. toolkit/workspace/precompiled/micrOS.mpy +0 -0
  231. toolkit/workspace/precompiled/micrOSloader.mpy +0 -0
  232. toolkit/workspace/precompiled/microIO.mpy +0 -0
  233. toolkit/workspace/precompiled/modules/IO_esp32.mpy +0 -0
  234. toolkit/workspace/precompiled/modules/IO_esp32c3.mpy +0 -0
  235. toolkit/workspace/precompiled/modules/IO_esp32c6.mpy +0 -0
  236. toolkit/workspace/precompiled/modules/IO_esp32s2.mpy +0 -0
  237. toolkit/workspace/precompiled/modules/IO_esp32s3.mpy +0 -0
  238. toolkit/workspace/precompiled/modules/IO_m5stamp.mpy +0 -0
  239. toolkit/workspace/precompiled/modules/IO_qtpy.mpy +0 -0
  240. toolkit/workspace/precompiled/modules/IO_rp2.mpy +0 -0
  241. toolkit/workspace/precompiled/modules/IO_tinypico.mpy +0 -0
  242. toolkit/workspace/precompiled/modules/LM_L298N.mpy +0 -0
  243. {micrOS/source → toolkit/workspace/precompiled/modules}/LM_L9110_DCmotor.py +4 -4
  244. toolkit/workspace/precompiled/modules/LM_OV2640.mpy +0 -0
  245. toolkit/workspace/precompiled/{LM_VL53L0X.py → modules/LM_VL53L0X.py} +5 -5
  246. toolkit/workspace/precompiled/modules/LM_aht10.mpy +0 -0
  247. toolkit/workspace/precompiled/modules/LM_bme280.mpy +0 -0
  248. toolkit/workspace/precompiled/{LM_buzzer.mpy → modules/LM_buzzer.mpy} +0 -0
  249. toolkit/workspace/precompiled/modules/LM_cct.mpy +0 -0
  250. toolkit/workspace/precompiled/modules/LM_cluster.mpy +0 -0
  251. toolkit/workspace/precompiled/modules/LM_co2.mpy +0 -0
  252. toolkit/workspace/precompiled/modules/LM_dht11.mpy +0 -0
  253. toolkit/workspace/precompiled/modules/LM_dht22.mpy +0 -0
  254. toolkit/workspace/precompiled/modules/LM_dimmer.mpy +0 -0
  255. toolkit/workspace/precompiled/modules/LM_distance.mpy +0 -0
  256. toolkit/workspace/precompiled/modules/LM_ds18.mpy +0 -0
  257. toolkit/workspace/precompiled/{LM_esp32.py → modules/LM_esp32.py} +16 -4
  258. toolkit/workspace/precompiled/modules/LM_espnow.py +53 -0
  259. toolkit/workspace/precompiled/modules/LM_fileserver.mpy +0 -0
  260. toolkit/workspace/precompiled/{LM_gameOfLife.mpy → modules/LM_gameOfLife.mpy} +0 -0
  261. toolkit/workspace/precompiled/modules/LM_genIO.mpy +0 -0
  262. toolkit/workspace/precompiled/modules/LM_haptic.mpy +0 -0
  263. toolkit/workspace/precompiled/modules/LM_i2c.py +61 -0
  264. toolkit/workspace/precompiled/modules/LM_i2s_mic.mpy +0 -0
  265. toolkit/workspace/precompiled/{LM_ld2410.mpy → modules/LM_ld2410.mpy} +0 -0
  266. toolkit/workspace/precompiled/modules/LM_light_sensor.mpy +0 -0
  267. toolkit/workspace/precompiled/modules/LM_mh_z19c.py +198 -0
  268. toolkit/workspace/precompiled/modules/LM_neoeffects.mpy +0 -0
  269. toolkit/workspace/precompiled/modules/LM_neopixel.mpy +0 -0
  270. toolkit/workspace/precompiled/modules/LM_oled.mpy +0 -0
  271. toolkit/workspace/precompiled/modules/LM_oled_sh1106.mpy +0 -0
  272. toolkit/workspace/precompiled/modules/LM_oled_ui.mpy +0 -0
  273. toolkit/workspace/precompiled/modules/LM_pacman.mpy +0 -0
  274. toolkit/workspace/precompiled/modules/LM_presence.mpy +0 -0
  275. toolkit/workspace/precompiled/modules/LM_qmi8658.py +204 -0
  276. toolkit/workspace/precompiled/{LM_rencoder.py → modules/LM_rencoder.py} +40 -11
  277. toolkit/workspace/precompiled/modules/LM_rest.mpy +0 -0
  278. toolkit/workspace/precompiled/modules/LM_rgb.mpy +0 -0
  279. toolkit/workspace/precompiled/{LM_rgbcct.mpy → modules/LM_rgbcct.mpy} +0 -0
  280. toolkit/workspace/precompiled/modules/LM_roboarm.mpy +0 -0
  281. toolkit/workspace/precompiled/modules/LM_robustness.py +137 -0
  282. toolkit/workspace/precompiled/{LM_rp2w.py → modules/LM_rp2w.py} +3 -0
  283. toolkit/workspace/precompiled/{LM_sdcard.py → modules/LM_sdcard.py} +3 -0
  284. toolkit/workspace/precompiled/{LM_servo.mpy → modules/LM_servo.mpy} +0 -0
  285. toolkit/workspace/precompiled/modules/LM_sound_event.mpy +0 -0
  286. toolkit/workspace/precompiled/{LM_stepper.mpy → modules/LM_stepper.mpy} +0 -0
  287. toolkit/workspace/precompiled/modules/LM_switch.mpy +0 -0
  288. toolkit/workspace/precompiled/modules/LM_system.mpy +0 -0
  289. toolkit/workspace/precompiled/modules/LM_tcs3472.py +187 -0
  290. toolkit/workspace/precompiled/modules/LM_telegram.mpy +0 -0
  291. toolkit/workspace/precompiled/{LM_tinyrgb.mpy → modules/LM_tinyrgb.mpy} +0 -0
  292. toolkit/workspace/precompiled/modules/LM_trackball.mpy +0 -0
  293. toolkit/workspace/precompiled/modules/LM_veml7700.mpy +0 -0
  294. toolkit/workspace/precompiled/modules/LM_web.mpy +0 -0
  295. toolkit/workspace/precompiled/urequests.mpy +0 -0
  296. {micrOS/source → toolkit/workspace/precompiled/web}/dashboard.html +9 -4
  297. toolkit/workspace/precompiled/web/editor.js +440 -0
  298. toolkit/workspace/precompiled/web/filesui.html +178 -0
  299. toolkit/workspace/precompiled/web/filesui.js +338 -0
  300. toolkit/workspace/precompiled/{index.html → web/index.html} +44 -2
  301. toolkit/workspace/precompiled/web/uapi.js +103 -0
  302. toolkit/workspace/precompiled/web/udashboard.js +129 -0
  303. toolkit/workspace/precompiled/web/ustyle.css +55 -0
  304. toolkit/workspace/precompiled/web/uwidgets.js +172 -0
  305. toolkit/workspace/precompiled/web/uwidgets_pro.js +99 -0
  306. env/driver_cp210x/CH34XSER_MAC/CH34X_DRV_INSTALL_INSTRUCTIONS.pdf +0 -0
  307. env/driver_cp210x/CH34XSER_MAC/CH34xVCPDriver.pkg +0 -0
  308. micrOS/micropython/esp32-20231005-v1.21.0.bin +0 -0
  309. micrOS/micropython/esp32c3-GENERIC-20240105-v1.22.1.bin +0 -0
  310. micrOS/micropython/esp32c3-GENERIC-20240222-v1.22.2.bin +0 -0
  311. micrOS/micropython/esp32s2-GENERIC-20240105-v1.22.1.bin +0 -0
  312. micrOS/micropython/esp32s2-LOLIN_MINI-20220618-v1.19.1.bin +0 -0
  313. micrOS/micropython/esp32s3-GENERIC-20240105-v1.22.1.bin +0 -0
  314. micrOS/micropython/esp32s3_spiram_oct-20231005-v1.21.0.bin +0 -0
  315. micrOS/micropython/rpi-pico-w-20231005-v1.21.0.uf2 +0 -0
  316. micrOS/micropython/tinypico-20231005-v1.21.0.bin +0 -0
  317. micrOS/micropython/tinypico-usbc-UM-20240105-v1.22.1.bin +0 -0
  318. micrOS/source/LM_L298N_DCmotor.py +0 -86
  319. micrOS/source/LM_catgame.py +0 -74
  320. micrOS/source/LM_dashboard_be.py +0 -37
  321. micrOS/source/LM_demo.py +0 -85
  322. micrOS/source/LM_distance.py +0 -88
  323. micrOS/source/LM_i2c.py +0 -44
  324. micrOS/source/LM_intercon.py +0 -57
  325. micrOS/source/LM_keychain.py +0 -318
  326. micrOS/source/LM_lmpacman.py +0 -126
  327. micrOS/source/LM_neoeffects.py +0 -327
  328. micrOS/source/LM_pet_feeder.py +0 -76
  329. micrOS/source/LM_ph_sensor.py +0 -51
  330. micrOS/source/LM_rest.py +0 -40
  331. micrOS/source/LM_robustness.py +0 -73
  332. micrOS/source/LM_telegram.py +0 -96
  333. micrOS/source/reset.py +0 -11
  334. micrOS/source/uapi.js +0 -76
  335. micrOS/source/udashboard.js +0 -137
  336. micrOS/source/ustyle.css +0 -28
  337. micrOS/source/uwidgets.js +0 -179
  338. micrOSDevToolKit-2.1.5.dist-info/RECORD +0 -337
  339. toolkit/dashboard_apps/AirQualityBME280.py +0 -36
  340. toolkit/dashboard_apps/AirQualityDHT22_CO2.py +0 -36
  341. toolkit/lib/file_extensions.py +0 -16
  342. toolkit/simulator_lib/__pycache__/LP_darwin.cpython-312.pyc +0 -0
  343. toolkit/simulator_lib/__pycache__/LP_darwin.cpython-38.pyc +0 -0
  344. toolkit/simulator_lib/__pycache__/LP_darwin.cpython-39.pyc +0 -0
  345. toolkit/simulator_lib/__pycache__/sim_console.cpython-312.pyc +0 -0
  346. toolkit/simulator_lib/__pycache__/sim_console.cpython-38.pyc +0 -0
  347. toolkit/simulator_lib/__pycache__/sim_console.cpython-39.pyc +0 -0
  348. toolkit/workspace/precompiled/IO_esp32.mpy +0 -0
  349. toolkit/workspace/precompiled/IO_esp32c3.mpy +0 -0
  350. toolkit/workspace/precompiled/IO_esp32s2.mpy +0 -0
  351. toolkit/workspace/precompiled/IO_esp32s3.mpy +0 -0
  352. toolkit/workspace/precompiled/IO_qtpy.mpy +0 -0
  353. toolkit/workspace/precompiled/IO_rp2.mpy +0 -0
  354. toolkit/workspace/precompiled/IO_tinypico.mpy +0 -0
  355. toolkit/workspace/precompiled/LM_L298N_DCmotor.mpy +0 -0
  356. toolkit/workspace/precompiled/LM_OV2640.mpy +0 -0
  357. toolkit/workspace/precompiled/LM_aht10.mpy +0 -0
  358. toolkit/workspace/precompiled/LM_bme280.mpy +0 -0
  359. toolkit/workspace/precompiled/LM_catgame.py +0 -74
  360. toolkit/workspace/precompiled/LM_cct.mpy +0 -0
  361. toolkit/workspace/precompiled/LM_co2.mpy +0 -0
  362. toolkit/workspace/precompiled/LM_dashboard_be.py +0 -37
  363. toolkit/workspace/precompiled/LM_demo.py +0 -85
  364. toolkit/workspace/precompiled/LM_dht11.mpy +0 -0
  365. toolkit/workspace/precompiled/LM_dht22.mpy +0 -0
  366. toolkit/workspace/precompiled/LM_dimmer.mpy +0 -0
  367. toolkit/workspace/precompiled/LM_distance.py +0 -88
  368. toolkit/workspace/precompiled/LM_ds18.mpy +0 -0
  369. toolkit/workspace/precompiled/LM_genIO.mpy +0 -0
  370. toolkit/workspace/precompiled/LM_i2c.py +0 -44
  371. toolkit/workspace/precompiled/LM_i2s_mic.mpy +0 -0
  372. toolkit/workspace/precompiled/LM_intercon.mpy +0 -0
  373. toolkit/workspace/precompiled/LM_keychain.mpy +0 -0
  374. toolkit/workspace/precompiled/LM_light_sensor.mpy +0 -0
  375. toolkit/workspace/precompiled/LM_lmpacman.mpy +0 -0
  376. toolkit/workspace/precompiled/LM_neoeffects.mpy +0 -0
  377. toolkit/workspace/precompiled/LM_neopixel.mpy +0 -0
  378. toolkit/workspace/precompiled/LM_oled.mpy +0 -0
  379. toolkit/workspace/precompiled/LM_oled_sh1106.mpy +0 -0
  380. toolkit/workspace/precompiled/LM_oled_ui.mpy +0 -0
  381. toolkit/workspace/precompiled/LM_pet_feeder.py +0 -76
  382. toolkit/workspace/precompiled/LM_ph_sensor.py +0 -51
  383. toolkit/workspace/precompiled/LM_presence.mpy +0 -0
  384. toolkit/workspace/precompiled/LM_rest.mpy +0 -0
  385. toolkit/workspace/precompiled/LM_rgb.mpy +0 -0
  386. toolkit/workspace/precompiled/LM_roboarm.mpy +0 -0
  387. toolkit/workspace/precompiled/LM_robustness.py +0 -73
  388. toolkit/workspace/precompiled/LM_switch.mpy +0 -0
  389. toolkit/workspace/precompiled/LM_system.mpy +0 -0
  390. toolkit/workspace/precompiled/LM_telegram.mpy +0 -0
  391. toolkit/workspace/precompiled/reset.mpy +0 -0
  392. toolkit/workspace/precompiled/uapi.js +0 -76
  393. toolkit/workspace/precompiled/udashboard.js +0 -137
  394. toolkit/workspace/precompiled/ustyle.css +0 -28
  395. toolkit/workspace/precompiled/uwidgets.js +0 -179
  396. /toolkit/user_data/node_config_archive/.include → /micrOS/source/config/_git.keep +0 -0
  397. /micrOS/source/{IO_rp2.py → modules/IO_rp2.py} +0 -0
  398. /micrOS/source/{LM_tinyrgb.py → modules/LM_tinyrgb.py} +0 -0
  399. {micrOSDevToolKit-2.1.5.dist-info → microsdevtoolkit-2.26.1.dist-info/licenses}/LICENSE +0 -0
  400. {micrOSDevToolKit-2.1.5.dist-info → microsdevtoolkit-2.26.1.dist-info}/top_level.txt +0 -0
@@ -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('/'))
@@ -0,0 +1,4 @@
1
+ import random as _random
2
+
3
+ def getrandbits(k):
4
+ return _random.getrandbits(k)
@@ -5,4 +5,8 @@ def socket():
5
5
 
6
6
 
7
7
  def getaddrinfo(host, port):
8
- return py_socket.getaddrinfo(host, port)
8
+ addrinfo = py_socket.getaddrinfo(host, port)
9
+ ipv4_addrinfo = [ addr for addr in addrinfo if len(addr[-1]) == 2 ]
10
+ if len(addrinfo) != len(ipv4_addrinfo):
11
+ print("[sim] getaddrinfo ipv6 unsupported...")
12
+ return ipv4_addrinfo
Binary file
Binary file
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 = 30
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 = SocketDictClient(host=ip, port=port, silent_mode=True, tout=3).non_interactive(['version'])
216
+ version_data = connection.non_interactive(['version'])
212
217
  elapsed_time = "{:.3f}".format(time.time() - start_comm)
213
- except:
214
- pass
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
- data_line_str = "{base}{spr2}{ip}\t{stat}\t\t{version}\t\t{elapt}" \
220
- .format(base=base_info, spr2=spacer1, ip=ip,
221
- stat=is_online, version=version_data, elapt=elapsed_time)
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 - 14)
227
- print("{cols} [ UID ]{spr1}[ FUID ]\t\t[ IP ]\t\t[ STATUS ]\t[ VERSION ]\t[COMM SEC]{cole}"
228
- .format(spr1=spacer1, cols=Colors.OKBLUE + Colors.BOLD, cole=Colors.NC))
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=3, pwd=None, verbose=False):
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
- if '<a>' in command_buffer:
425
- return ' '.join(command_buffer), return_action_dict
426
- return ' <a> '.join(command_buffer), return_action_dict
441
+ result = command_buffer, return_action_dict
442
+ print(f"SocketClient: {result}")
443
+ return result
427
444
 
428
445
 
429
- def run(arg_list=[], timeout=5):
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
- output = main(args, host=host, port=port, timeout=timeout, pwd=action['password'], verbose=action['verbose'])
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
- arg_list = sys.argv[1:]
455
- run(arg_list=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:5000/webhooks/generic/TinyDevBoard+system+clock
5
+ Example: http://10.0.1.61:5005/webhooks/generic/TinyDevBoard+system+clock
6
6
  """
7
7
 
8
8
  import sys, os
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env python3
2
+
3
+ """
4
+ Template for webhook creation
5
+ - replies with basic response message
6
+ Example: http://10.0.1.61:5005/webhooks/template
7
+ """
8
+
9
+ import sys, os
10
+ SCRIPT_NAME = os.path.basename(sys.argv[0])
11
+ SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
12
+ SCRIPT_ARGS = sys.argv[1:]
13
+ sys.path.append(os.path.join(os.path.dirname(os.path.dirname(SCRIPT_DIR)), "lib"))
14
+ import macroScript
15
+
16
+ WORKDIR = os.environ.get("MACRO_WORKDIR", None)
17
+ if WORKDIR is None:
18
+ WORKDIR = SCRIPT_DIR
19
+
20
+ print(f"MacroHooks {SCRIPT_NAME} script, set workdir with MACRO_WORKDIR env. var.")
21
+
22
+ def search_macros():
23
+ contents = [ f.split('.')[0] for f in os.listdir(WORKDIR) if f.endswith(".macro") ]
24
+ return contents
25
+
26
+
27
+ def run(name):
28
+ executor = macroScript.Executor()
29
+ macro_path = os.path.join(WORKDIR, f"{name}.macro")
30
+ executor.run_micro_script(macro_path)
31
+
32
+
33
+ def main():
34
+ macro_list = search_macros()
35
+ if len(SCRIPT_ARGS) == 0:
36
+ print(f"Available macros: {macro_list}")
37
+ elif SCRIPT_ARGS[0] in macro_list:
38
+ run(SCRIPT_ARGS[0])
39
+ else:
40
+ print("Macro not exists")
41
+
42
+
43
+ ############## MAIN ##############
44
+ main()
@@ -0,0 +1,20 @@
1
+ #microscript 127.0.0.1 safe
2
+ # Comments:
3
+ # SHEBANG LINE: #microscript <device> <password> <opts>
4
+ # <device> : host name or IP address
5
+ # <password> : optional parameter, defualt: ADmin123
6
+ # <opts> : additional optional params, like: debug, safe
7
+ # debug : show verbose output
8
+ # safe : only run loaded modules
9
+ #
10
+ # You can list any load module call to be executed...
11
+ #
12
+ # Additional script commands:
13
+ # wait X - seconds to wait before execute next command
14
+ # # - line comment
15
+
16
+ system info
17
+ task list
18
+ system clock
19
+ wait 3
20
+ system clock
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Template for webhook creation
5
5
  - replies with basic response message
6
- Example: http://10.0.1.61:5000/webhooks/template
6
+ Example: http://10.0.1.61:5005/webhooks/template
7
7
  """
8
8
 
9
9
  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
@@ -1 +1 @@
1
- 1.20.0
1
+ 1.24.1
File without changes
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- from microIO import physical_pin, pinmap_dump
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(physical_pin('l9110dir_1')), freq=1024))
19
- __L9110_OBJS.append(PWM(Pin(physical_pin('l9110dir_2')), freq=1024))
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
@@ -45,7 +45,7 @@ def pinmap():
45
45
  - info which pins to use for this application
46
46
  :return dict: pin name (str) - pin value (int) pairs
47
47
  """
48
- return pinmap_dump(['l9110dir_1', 'l9110dir_2'])
48
+ return pinmap_search(['l9110dir_1', 'l9110dir_2'])
49
49
 
50
50
 
51
51
  def help(widgets=False):
@@ -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 physical_pin, pinmap_dump
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(physical_pin('i2c_scl')), Pin(physical_pin('i2c_sda')), freq=9600)
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:
@@ -365,12 +365,12 @@ def pinmap():
365
365
  - info which pins to use for this application
366
366
  :return dict: pin name (str) - pin value (int) pairs
367
367
  """
368
- return pinmap_dump(['i2c_scl', 'i2c_sda'])
368
+ return pinmap_search(['i2c_scl', 'i2c_sda'])
369
369
 
370
370
 
371
371
  def help(widgets=False):
372
372
  """
373
- [i] micrOS LM naming convention - built-in help message
373
+ [BETA][i] micrOS LM naming convention - built-in help message
374
374
  :return tuple:
375
375
  (widgets=False) list of functions implemented by this application
376
376
  (widgets=True) list of widget json for UI generation
@@ -1,4 +1,5 @@
1
1
  import esp32
2
+ from Common import syslog
2
3
 
3
4
  #########################
4
5
  # Application functions #
@@ -17,8 +18,19 @@ def temp():
17
18
  """
18
19
  Measure CPU temperature
19
20
  """
21
+ try:
22
+ cpu_temp = esp32.mcu_temperature()
23
+ return {'MCU temp [C]': int(cpu_temp)}
24
+ except:
25
+ pass
26
+ try:
27
+ raw_temp = esp32.raw_temperature()
28
+ except Exception as e:
29
+ syslog(f"[WARN] cpu temp: {e}")
30
+ return {'CPU temp [C]': -1.0}
20
31
  # read the internal temperature of the MCU, in Farenheit
21
- return {'CPU temp [ºC]': '{:.1f}'.format((esp32.raw_temperature() - 32) / 1.8)}
32
+ cpu_temp = round((raw_temp - 32) / 1.8, 1)
33
+ return {'CPU temp [C]': cpu_temp}
22
34
 
23
35
 
24
36
  def touch(triglvl=300):
@@ -28,8 +40,8 @@ def touch(triglvl=300):
28
40
  :return dict: verdict isTouched and value
29
41
  """
30
42
  from machine import TouchPad, Pin
31
- from microIO import physical_pin
32
- t = TouchPad(Pin(physical_pin('touch_0')))
43
+ from microIO import resolve_pin
44
+ t = TouchPad(Pin(resolve_pin('touch_0')))
33
45
  value = t.read() # Returns a smaller number when touched
34
46
  return {'isTouched': True if value < triglvl else False, 'value': value}
35
47
 
@@ -49,7 +61,7 @@ def battery():
49
61
 
50
62
  def help(widgets=False):
51
63
  """
52
- [i] micrOS LM naming convention - built-in help message
64
+ [BETA][i] micrOS LM naming convention - built-in help message
53
65
  :return tuple:
54
66
  (widgets=False) list of functions implemented by this application
55
67
  (widgets=True) list of widget json for UI generation