-
Install the Pymakr VSCode Extension
(We're installing the preview, but once the project reaches "stable" we'll, be using the regular extension.)
-
That's it! You've installed the Pymakr Extension for VSCode
Pymakr revolves around projects that can be uploaded to your devices. To create your first project click the +
icon and select a folder for your project:
Note: If a project is created outside the current workspace(s), its folder will be mounted as a new workspace.
Below we add a main.py
. Once uploaded to a device, this file will run whenever the device is reset.
Once the project is ready to run, it needs to be uploaded to a device.
To speed up development, you can put a project in development mode
.
In development mode, Pymakr automatically propagates local file changes to connected devices and then restarts the main script.
Dev mode can be configured in pymakr.json
{
"onUpdate": "restartScript" | "softRestartDevice" | "hardRestartDevice"
}
onUpdate: Action to be called once file changes have been propagated.
- restartScript Clears the
main.py
module as well as any changed modules. Then importsboot.py
andmain.py
. - softRestartDevice Performs ctrl + d
- hardRestartDevice Performs
machine.reset()
machine.sleep
and machine.deepsleep
do not work in development since they stop the USB connection.
Having to switch between different tabs can be cumbersome. To solve this, you can drag your devices and projects to the file explorer view.