An IoT alarm clock using Micropython on a RPi Pico W
- uv
Create a file on the device called credentials.txt with your wifi credentials in the following format:
SSID
PASSWORD
Static and templates must be copied to the device.
uv run mpr put templates/index.html templates/Dependencies are contained in the lib folder.
Subdirectories such as lib/primitives must be created manually before running xrun.
mpr can cross-compile the python files to MPY files for the Pico W using xrun
uv run mpr xrun mainThis will also change main.py to main.mpy, which is not recognised by Micropython when booting! If you wan to run the compiled code on boot, you must also copy over the main.py file:
uv run mpr put main.py .Run tests by mounting the local file system on the device and running the tests in the tests folder.
uv run mpr --mount . run tests/test_main.pyIf ampy can't connect make the port usable again
sudo chmod 666 /dev/ttyACM0Open REPL with minicom
minicom -D /dev/ttyACM0 -b 115200Or even better with mpr:
mpr repl