Obv this repo needs WAY better documentation but its fiiiiine we ball - I'll fill in more info as we go! :) Note: If you're familiar with Git / Github, you can clone this repo Clone then open in vscode with the extension installed and it will auto-boot into a pi pico project with all these files for easy use.
This guide should show you a set-by-set tutorial to setting up your Pi Pico with VSCode (The IDE we will be coding the robot with!): https://randomnerdtutorials.com/raspberry-pi-pico-vs-code-micropython/ NOTE: This tutorial uses Pico-W-Go instead of VSCode's official dedicated plugin for Pi Picos. As the official plugin is much better, we will be using it instead!
Aternatively:
- Install VSCode: https://code.visualstudio.com/download
- Download Python: https://www.python.org/downloads/
- Download Raspberry Pi Pico MicroPython Configuration File (UF2). Get the latest version here: https://micropython.org/download/RPI_PICO/
Once you've downloaded VSCode, we need to install an extension that allows vscode to interact with Pi Picos:
- Navigate to VSCode plugins & Type in "Pi Pico"
- Install the official "Raspberry Pi Pico" plugin
3. ACTIVATE AUTOSAVE PLEASE OH MY LORD IT WILL SAVE YOU FROM SO MUCH PAIN
To get the pi pico board in bootloader mode (ready for us to configure it to use micropython), hold down the BOOTSEL button while plugging the board into USB. The uf2 file that we downloaded should then be copied to the USB mass storage device that appears (New drive in file explorer named RPI-RP5 or smthn). Once programming of the new firmware is complete the device will automatically reset and be ready for use! Just unplug and replug.
VSCode's extension for Pi Pico makes working with pico embedded systems so much easier.
- Navigate to the Pi Pico plugin and create a new Pi Pico Project
Then, plug in your pico and it will auto detect it. In order to run your files on the pico, r-click on a file and select "Run current file on Pico". Note that if you ever hit control-c while a program is running, the pi needs to be restarted (unplug & replug, or disconnect & reconnect) - ALSO if you don't have autosave and forget to save your changes, NOTHING WILL BE UPLOADED TO THE PICO AND IT WON'T TELL YOU.
Start by running the blink.py file! When you run it, your Pi Pico's LED should start flashing on and off in an infinite loop.

We recommend you look through the elec slides before this section so you understand the basic concepts of wiring, breadboards, and pins.
So we know that a pin in the elec sense is the literal pin that comes out of the raspberry pi pico that we can connect wires to, but a pin in software is a little different, mainly in how they are indexed. Below is an image of a Pi Pico's pinout (list of all pins, and what they can do)

As a quick legend, everything that's red is power (in or out of the pico), black is ground (all electrical equipment must be connected to a common ground wire), and everything else is a pin that can send & recieve signals (a string of 1 & 0 bits that pi pico / board interprets as data).
When our code tries to connect to Pin #17 in order to send signals over that pin, we're connecting to the pin on the pi pico with GP pin = 17. NOT THE NUMBERS IN GRAY! It's a little misleading. Those are the physical pin numbers - the software pin numbers are only the GP (green) pins, so their indices are different.
PWM: TODO
Running Servo: TODO
Running Motor: TODO
Above and beyond: TODO