This is our amazing introduction to basic electronics and working with the Raspberry Pi Pico microcontroller. These lessons will help you bring code to life and release your inner mad scientist!
Basically you just need the simple Python editor called Thonny which allows you write code on your laptop and execute it on the Pico via a USB cable. USB cables will be provided just make sure you have a laptop with Thonny installed and an available USB jack on your laptop. We will have a few USB C to USB A adapters for those with only tiny ports. We will not have Mac dongles so make sure you have a way to connect a USB A cable into your laptop.
Please download and install the latest version(4.x or higher) of Thonny.
Download Thonny
For these labs, you do NOT have to be a Python expert. You can probably get by fine without having ever done Python programming before. However, some general programming knowledge is required. As long as you are comfortable with basic programming constructs(IF/ELSE statements, For/While loops, etc...) in other languagues we will have enough of the code for you to figure out the Python bits. If you want to get a little familar with Python before coming you can check out this free tutorial get comfortable with Python. We will have code samples and links to reference materials if you just need to see how to do "normal" programming things in Python. Python Tutorial
If you are using this as part of a Hackathon or contest, check out our Hackathon Guide.
We start with a basic introduction to circuits and some basic electronics. So, the first several labs only use the Pico as a power source to introduce basic circuits and some electronic components we will be working with. Without this foundational knowledge, it will be difficult to build useful solutions that integrate code and electronics.
If you aren't familar with how to use a breadboard, please take a moment and look at our introduction to them before starting the labs: Introduction to Breadboards
NOTE on LABS
We provide working code for each lab, but you are welcome to try to code some of the stretch goals or solutions on your own once you get the hang of things.
Many of the labs reference specific columns and rows to use when plugging in electronics. This is just to make it easier for beginners. The exact column and rows do not matter if you already understand how a breadboard works and know how to complete the circuit. If this is all brand new to this, you should follow our instructions exactly. But just know as you learn more about breadboards and circuits the exact location you plug things into the breadboard in many of the labs aren't important if you still complete the circuit.
If you finish a lab quickly and see others that are struggling, your stretch goal is to help a neighbor!
Simple circuit with LED using power from Pico and turn on LED.
Lab 1
Same simple circuit from above and just add resistors to control the brightness of the LED.
Lab 2
Working with Light Sensitive Resistors. Also known as Photoresistors.
Lab 3
Use a Potentiometer to control brightness of LED.
Lab 4
Introduction to using Buttons/Switches with cicuits:
Lab 5
Finally, we will use code to light up LEDs:
Lab 6
Lab 7
Use the Pico to detect when a button is pressed.
Lab 8
Lab 9
Optional Game - Reaction Time Lab 16
Lab 10
Explain PWM and use PWM to fade an LED in and out and control brightness.
Lab 11
Buzzer lab with PWM.
Lab 11b
Use PWM to control a servo:
Lab 12
Threading on the Pico:
Lab 13
Using Analog input with the Pico:
Lab 14
Seven Segment Display:
Lab 15
Final Lab 01
Final Lab 02
Final Lab 03
- Pico, Pico H, or Pico W (Pico H is less work since it has pins soldered already)
- Breadboard
- Jumper Wires
- LEDs
- Button (push button switch)
- micro USB cable
- Active Buzzer
- Photoresistor(5528, but others would work)
- Resistors(220 Ohm, 10K Ohm) 2 of each
- sg90 type mini servo
- 10K Ohm Trim Potentiometer
- 3D printed parts for final 3 game labs & paint stirring stick.Models