python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt# pyrobusta.env
wifi_ssid="<your-wifi-ssid>"
wifi_password="<your-wifi-password>"
tls="true"
socket_max_con=2
http_mem_cap=0.05
...pyrobusta.env contains runtime configuration, deployed to the device. This allows the user to override the
default behavior and configure optional settings. Configuration settings are optional, however, you need to define
̇wifi_ssid and ̇wifi_password if your application does not already handle network connectivity.
- rules such as
make run-unixormake run-devicealso rely on pyrobusta.env, allowing the user to experiment with different settings - pyrobusta.env is ignored when running functional tests (
make test-unix,make test-device)
Check configuration.md for all configuration options.
make toolchain # Setup mpy-cross and micropython
make build # Cross-compile, create build artifacts
make stage-example # Create runtime directory for unix port
make run-unix # Run example application on the unix port of micropythonmake toolchain # Setup mpy-cross and micropython
make build # Cross-compile, create build artifacts
make deploy # Upload build artifacts to device using mpremote
make tls-cert # Optional: generate self-signed certificate for the device
make deploy-cert # Optional: upload generated certificate to the device
make deploy-example # Deploy the selected example app using mpremote
make run-device # Optional: Reset the device and connect through REPLdeploy-example and run-device uses the DEVICE argument
set to u0 (/dev/ttyUSB0) by default, passed to mpremote.
Override the DEVICE argument to select a different device, e.g.
make DEVICE=a0 run-device for /dev/ttyACM0. Check mpremote --help
for additional shortcuts.
When changing the source code, run the below rule for redeploying to the device.
make redeploy # Will run the following rules: clean build clean-device deploymake static-checkers # Run static checkers (Pylint, black formatter)
make unit-test # Run unit tests
make test-unix # Run functional tests on the unix port
make test-device # Run functional tests on a device