Skip to content

Lab Setup

Quick reference for setting up your workstation and robot at the start of each lab session. For the full walkthrough with troubleshooting, see Robot Unboxing.


First Time Setup

Install mpremote (once per machine):

pip install mpremote

Clone the picobot repository (once per machine):

git clone https://github.com/OE-KVK-H2IoT/picobot.git

Every Lab Session

1. Connect

Plug in the Pico via USB and verify it appears:

mpremote connect list | grep MicroPython

2. Clean (if needed)

If someone else used the Pico, or you want a fresh start:

cd picobot
mpremote run clean_pico.py

3. Upload Library

Copy the library to the Pico:

mpremote cp -r lib :

4. Verify

mpremote fs ls :lib/

You should see the library files listed. Then test in the REPL:

mpremote
>>> from picobot import Robot
>>> robot = Robot()

If you see Robot ready! and the LEDs flash green, you're good to go.


Update Library

To update the picobot library to the latest version:

cd picobot
git pull
mpremote cp -r lib :

Troubleshooting

Problem Fix
No device found Check USB cable (must be data, not charge-only), try another port
Permission denied (Linux) sudo usermod -a -G dialout $USER, then log out and back in
mpremote not found pip install mpremote (use pip3 on some systems)
Old main.py runs on boot mpremote run clean_pico.py to wipe all user files
ImportError: no module named 'picobot' Upload the library: mpremote cp -r lib :

← Getting Started | Robot Unboxing Tutorial