1. Goals

  • Introductions and get to know everyone.

  • End with an assembled, moving robot.

2. Objectives

By the end of today, our objectives are to:

  • setup the lab computers properly

  • assemble a robot chassis kit

  • use the onboard MicroPython REPL to drive the motors

  • write a script that runs on powerup to do some pre-configured motions

3. Mission and resources

  • Robot chassis with RP2040 microcontroller running MicroPython

  • Basic control and sensing

  • Limited energy storage

Team comments:

The COEguest login has access to a network drive (S:) that we will use to store and share code and files.

  • Create a folder for your team with the name: team-THENAME

4. Tasks

4.1. Setup the lab computers

4.2. Build your Beetlebot

This should take ~2 hours.
  • Build your Keyestudio Beetlebot

    • Instructions at docs / Keyestudio Beetlebot / 1. Preparation / 3. Install the Beetlebot Car

    • PDF version --- download this and open using Adobe Acrobat Reader

4.2.1. Build notes

A few notes on build steps.

  • Step 1 and 2 — Al block attaching the gear-motors to the lower board:
    Leave the two screws attaching the block to the board loose. This will help get the long screws and nuts for the gear-motor aligned.

  • Step 3 — attaching wheels to the gear-motors:
    The kits do not have the M2.3 x 16mm self-tapping screws. The wheels are a tight friction fit onto the gearbox shafts, so this is not a problem.

  • Step 5 (pdf page 10) — motor connectors:
    The plug on the motor has a narrower pin spacing than the jack on the board. Place the connector on one pin and gently flex the male pin on the board sideways until the plug meets up with the second pin. Then you should be able to push the plug onto both pins at once.

  • Step 8 — attaching the SG90 servo to the ultrasonic sensor bracket:
    You are likely to take off the M2x4mm self-tapping screw holding the control horn to the servo output shaft. Only lightly install the acrylic plate to the robot board. You wish to give yourself the ability to easily remove the ultrasonic sensor for adjustments or for using the extra LEGO accessories.

4.3. Upgrade MicroPython on your Pi Pico

  • Use a USB-micro cable to connect the Pi Pico to your PC.

  • Open Thonny. Click the lower-right menu. Select “Configure interpreter…​

thonny interpreter
  • Interpreter tab → Select “MicroPython (Raspberry Pi Pico)

thonny interpreter pico
  • Port or WebREPL. Ensure that “< Try to detect port automatically >” is selected

thonny interpreter port
  • Click on the lower-right link “Install or update MicroPython

  • Follow the instructions to start the bootloader on the Pico:

    • Unplug the USB port

    • Hold down the tiny white BOOTSEL button

    • Plug the USB port back in

    • Continue holding until the computer recognizes the new thing

  • Select the following options for family and variant, then click Install

thonny install micropython
  • Close, then OK to exit the options dialog box.

4.4. Run some vendor code

In the File Explorer, open

S: / COE / COEguest Shared / Robotics / Keyestudio Beetlebot

and poke around the 2. Python Tutorials folders. Try each folder in order.

























5. Ignore below stuff

What will be your robot’s mission?

6. Checklist

Supplies

  • Pico 4wd kits (4 + 1)

  • Markers and label tape for labeling wire harnesses

  • PCs with Thonny pre-installed. User account can do this themselves, easy

  • a

Shared folder content

  • MicroPython firmware. Not strictly needed - Thonny downloads automatically

  • pico-4wd libraries

    • unzipped to subfolder

    • original .zip to restore from accidents

7. Random things