I just got my Artemis watch, and I’m pretty excited to dig into it. I played around with circuitblocks, and so far my conclusion is that i’d prefer to work directly in python.
Are there any good online resources that document the APIs that are supported on the artemis? And I’d also like to know what the best way is to upload code to artemis outside of circuitblocks. It would be great if i could have a toolchain that integrates better with my usual development tools, so something connected to a Makefile would be great
Hi,
Since our python support is based on the micropython project, I would recommend checking out their docs for more info on the low-level side.
We didn’t yet release any high-level coding documentation for our python codebase, since it mostly serves as the underlying basis for beginner-friendly block-based coding.
Our python code structure goes something like this:
CircuitOS - this python module contains all commonly used hardware abstractions (Buttons, LEDs, Sliders, GPIO expanders, etc.)
Then you have a python module for each product, so for example the Artemis python module only contains GPIO pin definitions and hardware configuration.
As for building and modifying our micropython port, I would recommend following this README in the ports/esp32 directory.
After flashing the micropython build (following the README or through CircuitBlocks), I recommend the ampy utility. This will enable you to transfer python files to-and-from your device, so you can more easily transfer python files without needing to re-flash the entire micropython build.
Also, as a sidenote, after flashing micropython you can simply use it as a python REPL shell for some quick coding. The REPL shell is available on the Serial port of the device (115200 baud).