Skip to content

Latest commit

 

History

History
74 lines (64 loc) · 2.9 KB

development_status.md

File metadata and controls

74 lines (64 loc) · 2.9 KB

initial

  • run a code cell on a MCU

  • mpremote primitives

    • list connected boards and loop through them
    • switch the active MCU
    • avoid resetting MCU between cells ( use resume)
    • soft-reset a MCU
    • [/] hard-reset a MCU
      • only works on non-rp2040 devices
      • report / fix hardware reset issue on rp2040 machine.reset() ?
    • mount folder
    • [?] recursive delete wipe files from MCU - as a built-in magic ? / wait for / create PR for mpremote update ?
    • cellmagic to copy cell content to specific files on the MCS
      • %%micropython --writefile main.py
      • %%micropython --readfile boot.py

    !mpremote can be use to run any other command

    • !mpremote mip install
    • direct - copy file / files to / from
    • ls and other file operations
  • Notebook essentials

    • load magics from %pip install micropython-magic
    • get the output from the MCU into a python variable local = %eval remote - eval is not quite the same as mpremote - [x] retain type through json - works for the majority of standard types - [?] can this be done with repr(instead) of json ?
    • plot data from a MCU - [x] using bqplot ( > pyplot > vscode-Jupyter) - [/] add documentation / sample
  • is there a way to avoid needing to set %%micropython on all cells ? this could be done via an input_transformer - but keeping the state between cells may be quite hard / confusing

  • %timeit / %%timeit for micropython code to avoid measuring the mpremote startup overhead

Samples

  • Install
  • basic board control
  • blink
  • list connected boards and loop through them
  • [~] read sensor and build series ( file / list / plot)
  • flash a mcu with new firmware ( sample per port )
  • mip install
  • upload a repo / folder to a MCU

development

Testing

  • using Pytest
  • using testbook for testing notebooks
    • located in the ./tests/ folder

    • tests are paired with notebooks that contain the cells and magic commands to be tested

    • tests have not been mocked - and therefore require a connected MCU to run ( rp2040 )

    • Local on windows

      • on windows
      • on linux
      • on MacOS
    • Manual test:

      • jupyter notebook
      • jupyter labs
    • CI - using WOKWI as a device simulator ? Blocked as WOKWI CI does not implement serial connection