Raspberry Pi Pico why do I smell burning? 2025-11-04 Keiran O’Keeffe ██ In this workshop... 2 / 110 ██ In this workshop... 1. General terminology / Overview 3 / 110 ██ In this workshop... 1. General terminology / Overview 2. Setting up Thonny (software) 4 / 110 ██ In this workshop... 1. General terminology / Overview 2. Setting up Thonny (software) 3. Setting up the Pi 5 / 110 ██ In this workshop... 1. General terminology / Overview 2. Setting up Thonny (software) 3. Setting up the Pi 4. Blinking the onboard LED 6 / 110 ██ In this workshop... 1. General terminology / Overview 2. Setting up Thonny (software) 3. Setting up the Pi 4. Blinking the onboard LED 5. wiring an LED 7 / 110 ██ In this workshop... 1. General terminology / Overview 2. Setting up Thonny (software) 3. Setting up the Pi 4. Blinking the onboard LED 5. wiring an LED 6. wiring a button 8 / 110 ██ In this workshop... 1. General terminology / Overview 2. Setting up Thonny (software) 3. Setting up the Pi 4. Blinking the onboard LED 5. wiring an LED 6. wiring a button 9 / 110 ██ Slides 10 / 110 ██ Slides 1. Go to https://public.skynet.ie 11 / 110 ██ Slides 1. Go to https://public.skynet.ie 2. slides
12 / 110 ██ Slides 1. Go to https://public.skynet.ie 2. slides
3. 2025-2026
13 / 110 ██ Slides 1. Go to https://public.skynet.ie 2. slides
3. 2025-2026
4. compsoc
14 / 110 ██ Slides 1. Go to https://public.skynet.ie 2. slides
3. 2025-2026
4. compsoc
5. raspberry-pi-workshop-ii.html
15 / 110 ██ Slides 1. Go to https://public.skynet.ie 2. slides
3. 2025-2026
4. compsoc
5. raspberry-pi-workshop-ii.html
6. https://public.skynet.ie/slides/2025-2026/compsoc/raspberry-pi-workshop.html 16 / 110 ██ Slides 1. Go to https://public.skynet.ie 2. slides
3. 2025-2026
4. compsoc
5. raspberry-pi-workshop-ii.html
6. https://public.skynet.ie/slides/2025-2026/compsoc/raspberry-pi-workshop.html 17 / 110 ██ What is a Pico? The Raspberry PI pico 2W is a wireless![]()
enabled version of the PI pico 2 microcontroller. • Features: ◦ RP2350 Microcontroller ▪ Dual core 150MHz ◦ 4MB flash memory ◦ Bluetooth LE, Bluetooth classic ◦ 23 GPIO pins 3.3V 18 / 110 ██ What is GPIO? GPIO: (General Purpose Input-Output):![]()
A type of digital (meaing capable of binary states) pin that can function as an input sensor, out ouput provider 19 / 110 ██ PI setup / Thonny install 20 / 110 ██ PI setup / Thonny install 1. Go to: https://thonny.org/ and install the software 21 / 110 ██ PI setup / Thonny install 1. Go to: https://thonny.org/ and install the software 2. Plug in your pico zero 22 / 110 ██ PI setup / Thonny install 1. Go to: https://thonny.org/ and install the software 2. Plug in your pico zero 3. Go to run -> interpreter -> select micropython
23 / 110 ██ PI setup / Thonny install 1. Go to: https://thonny.org/ and install the software 2. Plug in your pico zero 3. Go to run -> interpreter -> select micropython
◦ Tools -> manage packages -> install picozero If this fails, follow steps on
proceeding slide 24 / 110 ██ PI setup / Thonny install 1. Go to: https://thonny.org/ and install the software 2. Plug in your pico zero 3. Go to run -> interpreter -> select micropython
◦ Tools -> manage packages -> install picozero If this fails, follow steps on
proceeding slide 4. Sit tight! 25 / 110 ██ PI setup / Thonny install 1. Go to: https://thonny.org/ and install the software 2. Plug in your pico zero 3. Go to run -> interpreter -> select micropython
◦ Tools -> manage packages -> install picozero If this fails, follow steps on
proceeding slide 4. Sit tight! 26 / 110 ██ Installing micropython firmware 27 / 110 ██ Installing micropython firmware 1. Download firmware (latest) from https://micropython.org/download/RPI_PICO2_W/ 28 / 110 ██ Installing micropython firmware 1. Download firmware (latest) from https://micropython.org/download/RPI_PICO2_W/ ◦ https://micropython.org/resources/firmware/RPI_PICO2_W-20250911-v1.26.1.uf2 29 / 110 ██ Installing micropython firmware 1. Download firmware (latest) from https://micropython.org/download/RPI_PICO2_W/ ◦ https://micropython.org/resources/firmware/RPI_PICO2_W-20250911-v1.26.1.uf2 2. Plug in your pi pico while holding the "bootsel" button 30 / 110 ██ Installing micropython firmware 1. Download firmware (latest) from https://micropython.org/download/RPI_PICO2_W/ ◦ https://micropython.org/resources/firmware/RPI_PICO2_W-20250911-v1.26.1.uf2 2. Plug in your pi pico while holding the "bootsel" button ◦ This enables bootloader mode 31 / 110 ██ Installing micropython firmware 1. Download firmware (latest) from https://micropython.org/download/RPI_PICO2_W/ ◦ https://micropython.org/resources/firmware/RPI_PICO2_W-20250911-v1.26.1.uf2 2. Plug in your pi pico while holding the "bootsel" button ◦ This enables bootloader mode 3. Your Pi should show up as a standard USB storage device on your machine 32 / 110 ██ Installing micropython firmware 1. Download firmware (latest) from https://micropython.org/download/RPI_PICO2_W/ ◦ https://micropython.org/resources/firmware/RPI_PICO2_W-20250911-v1.26.1.uf2 2. Plug in your pi pico while holding the "bootsel" button ◦ This enables bootloader mode 3. Your Pi should show up as a standard USB storage device on your machine 4. Drag and drop the downloaded .uf2 file onto the root of the raspberry pi 33 / 110 ██ Installing micropython firmware 1. Download firmware (latest) from https://micropython.org/download/RPI_PICO2_W/ ◦ https://micropython.org/resources/firmware/RPI_PICO2_W-20250911-v1.26.1.uf2 2. Plug in your pi pico while holding the "bootsel" button ◦ This enables bootloader mode 3. Your Pi should show up as a standard USB storage device on your machine 4. Drag and drop the downloaded .uf2 file onto the root of the raspberry pi 34 / 110 ██ Manual install of picozero (if necessary) 35 / 110 ██ Manual install of picozero (if necessary) 1. Go to the pico zero github (https://github.com/RaspberryPiFoundation/picozero) 36 / 110 ██ Manual install of picozero (if necessary) 1. Go to the pico zero github (https://github.com/RaspberryPiFoundation/picozero) 2. Download the "Picozero.py" file 37 / 110 ██ Manual install of picozero (if necessary) 1. Go to the pico zero github (https://github.com/RaspberryPiFoundation/picozero) 2. Download the "Picozero.py" file 3. Plug in your Pi Pico while holding the bootloader button 38 / 110 ██ Manual install of picozero (if necessary) 1. Go to the pico zero github (https://github.com/RaspberryPiFoundation/picozero) 2. Download the "Picozero.py" file 3. Plug in your Pi Pico while holding the bootloader button 4. In thonny, select View -> files, navigate to the directory where you
downloaded picozero.py. 39 / 110 ██ Manual install of picozero (if necessary) 1. Go to the pico zero github (https://github.com/RaspberryPiFoundation/picozero) 2. Download the "Picozero.py" file 3. Plug in your Pi Pico while holding the bootloader button 4. In thonny, select View -> files, navigate to the directory where you
downloaded picozero.py. ◦ Left Click -> upload to /
40 / 110 ██ Manual install of picozero (if necessary) 1. Go to the pico zero github (https://github.com/RaspberryPiFoundation/picozero) 2. Download the "Picozero.py" file 3. Plug in your Pi Pico while holding the bootloader button 4. In thonny, select View -> files, navigate to the directory where you
downloaded picozero.py. ◦ Left Click -> upload to /
5. Youve uploaded the picozero firmware! 41 / 110 ██ Manual install of picozero (if necessary) 1. Go to the pico zero github (https://github.com/RaspberryPiFoundation/picozero) 2. Download the "Picozero.py" file 3. Plug in your Pi Pico while holding the bootloader button 4. In thonny, select View -> files, navigate to the directory where you
downloaded picozero.py. ◦ Left Click -> upload to /
5. Youve uploaded the picozero firmware! 42 / 110 ██ Quick note! 43 / 110 ██ Quick note! • Whilst Thonny may seem like any other interpereter, when your using it for something like a PI PICO, all code is running on the PI itself, thonny is only acting as a middle-man. 44 / 110 ██ Quick note! • Whilst Thonny may seem like any other interpereter, when your using it for something like a PI PICO, all code is running on the PI itself, thonny is only acting as a middle-man. • Code can (and should) be saved locally onto the pi, allowing it to run without being connected to your laptop or any other computer 45 / 110 ██ Quick note! • Whilst Thonny may seem like any other interpereter, when your using it for something like a PI PICO, all code is running on the PI itself, thonny is only acting as a middle-man. • Code can (and should) be saved locally onto the pi, allowing it to run without being connected to your laptop or any other computer • The terminal shown in thonny is only a passthrough of the terminal within the pico 46 / 110 ██ Quick note! • Whilst Thonny may seem like any other interpereter, when your using it for something like a PI PICO, all code is running on the PI itself, thonny is only acting as a middle-man. • Code can (and should) be saved locally onto the pi, allowing it to run without being connected to your laptop or any other computer • The terminal shown in thonny is only a passthrough of the terminal within the pico 47 / 110 ██ Writing your first script! 48 / 110 ██ Writing your first script! 1. In this script we will simply blink the onboard LED of the Pico 49 / 110 ██ Writing your first script! 1. In this script we will simply blink the onboard LED of the Pico 2. Open Thonny, and open a new project. 50 / 110 ██ Writing your first script! 1. In this script we will simply blink the onboard LED of the Pico 2. Open Thonny, and open a new project. 3. Type this script out: 51 / 110 ██ Writing your first script! 1. In this script we will simply blink the onboard LED of the Pico 2. Open Thonny, and open a new project. 3. Type this script out: from picozero import pico_led
pico_led.on()
52 / 110 ██ Blinking the onboard LED 53 / 110 ██ Blinking the onboard LED 1. Alright! Now onto something (slightly) more complicated. 54 / 110 ██ Blinking the onboard LED 1. Alright! Now onto something (slightly) more complicated. 2. Write out this script: 55 / 110 ██ Blinking the onboard LED 1. Alright! Now onto something (slightly) more complicated. 2. Write out this script: from picozero import pico_led
from time import sleep
while True:
pico_led.on()
sleep(5)
pico_led.off()
sleep(5)
56 / 110 ██ Building Circuits! 57 / 110 ██ Building Circuits! • Next, we will assemble a simple circuit consisting of the pico, and LED, and a resistor. 58 / 110 ██ Building Circuits! • Next, we will assemble a simple circuit consisting of the pico, and LED, and a resistor. add photo of circuit or smth 59 / 110 ██ What is a resistor? 60 / 110 ██ What is a resistor? • The simple resistor is one of![]()
the most common electrical components on earth. 61 / 110 ██ What is a resistor? • The simple resistor is one of![]()
the most common electrical components on earth. • Resistors limit the flow of electrical current, often to protect components 62 / 110 ██ What is a resistor? • The simple resistor is one of![]()
the most common electrical components on earth. • Resistors limit the flow of electrical current, often to protect components • Resistance is measured in Ohms, 63 / 110 ██ What is a resistor? • The simple resistor is one of![]()
the most common electrical components on earth. • Resistors limit the flow of electrical current, often to protect components • Resistance is measured in Ohms, • The Ohm value of a resistor is indicated by the color pattern on the led which can be anywhere from 3 to 6 bands 64 / 110 ██ What is a resistor? • The simple resistor is one of![]()
the most common electrical components on earth. • Resistors limit the flow of electrical current, often to protect components • Resistance is measured in Ohms, • The Ohm value of a resistor is indicated by the color pattern on the led which can be anywhere from 3 to 6 bands 65 / 110 ██ Assembling the circuit 66 / 110 ██ Assembling the circuit 1. Plug the +3.3v pin from the PI pico into the +V rail on the breadboard 67 / 110 ██ Assembling the circuit 1. Plug the +3.3v pin from the PI pico into the +V rail on the breadboard 2. Plug the GND pin from the PI pico into the GND rail of the breadboard 68 / 110 ██ Assembling the circuit 1. Plug the +3.3v pin from the PI pico into the +V rail on the breadboard 2. Plug the GND pin from the PI pico into the GND rail of the breadboard 3. Attach the negative pin of the LED across the ground rail and main section of the breadboard. 69 / 110 ██ Assembling the circuit 1. Plug the +3.3v pin from the PI pico into the +V rail on the breadboard 2. Plug the GND pin from the PI pico into the GND rail of the breadboard 3. Attach the negative pin of the LED across the ground rail and main section of the breadboard. 4. The negative pin of the LED is indicated by being the shorter one 70 / 110 ██ Assembling the circuit 1. Plug the +3.3v pin from the PI pico into the +V rail on the breadboard 2. Plug the GND pin from the PI pico into the GND rail of the breadboard 3. Attach the negative pin of the LED across the ground rail and main section of the breadboard. 4. The negative pin of the LED is indicated by being the shorter one 5. Place the provided 220Ω resistor between pin 16, and the positive pin of the LED 71 / 110 ██ Assembling the circuit 1. Plug the +3.3v pin from the PI pico into the +V rail on the breadboard 2. Plug the GND pin from the PI pico into the GND rail of the breadboard 3. Attach the negative pin of the LED across the ground rail and main section of the breadboard. 4. The negative pin of the LED is indicated by being the shorter one 5. Place the provided 220Ω resistor between pin 16, and the positive pin of the LED 72 / 110 ██ Circuit diagram 73 / 110 ██ CODE TIME!!!1! 74 / 110 ██ CODE TIME!!!1! • Now that we have the circuit assembled, open thonny again and type in the following code: 75 / 110 ██ CODE TIME!!!1! • Now that we have the circuit assembled, open thonny again and type in the following code: • Note: the int value in "machine.Pin(16)" (16) denotes which GPIO pin we are referencing. 76 / 110 ██ CODE TIME!!!1! • Now that we have the circuit assembled, open thonny again and type in the following code: • Note: the int value in "machine.Pin(16)" (16) denotes which GPIO pin we are referencing. • Note 2: multipython has several options for setting the state of a pin: 77 / 110 ██ CODE TIME!!!1! • Now that we have the circuit assembled, open thonny again and type in the following code: • Note: the int value in "machine.Pin(16)" (16) denotes which GPIO pin we are referencing. • Note 2: multipython has several options for setting the state of a pin: • To turn the pin off: 78 / 110 ██ CODE TIME!!!1! • Now that we have the circuit assembled, open thonny again and type in the following code: • Note: the int value in "machine.Pin(16)" (16) denotes which GPIO pin we are referencing. • Note 2: multipython has several options for setting the state of a pin: • To turn the pin off: ◦ pin.value(0) (or) pin.on()
79 / 110 ██ CODE TIME!!!1! • Now that we have the circuit assembled, open thonny again and type in the following code: • Note: the int value in "machine.Pin(16)" (16) denotes which GPIO pin we are referencing. • Note 2: multipython has several options for setting the state of a pin: • To turn the pin off: ◦ pin.value(0) (or) pin.on()
• To turn the pin on: 80 / 110 ██ CODE TIME!!!1! • Now that we have the circuit assembled, open thonny again and type in the following code: • Note: the int value in "machine.Pin(16)" (16) denotes which GPIO pin we are referencing. • Note 2: multipython has several options for setting the state of a pin: • To turn the pin off: ◦ pin.value(0) (or) pin.on()
• To turn the pin on: ◦ pin.value(1) or pin.on()
81 / 110 ██ CODE TIME!!!1! • Now that we have the circuit assembled, open thonny again and type in the following code: • Note: the int value in "machine.Pin(16)" (16) denotes which GPIO pin we are referencing. • Note 2: multipython has several options for setting the state of a pin: • To turn the pin off: ◦ pin.value(0) (or) pin.on()
• To turn the pin on: ◦ pin.value(1) or pin.on()
• (pin is just the name of the desired variable defined earlier in the script. led_pin in the shown example) 82 / 110 ██ CODE TIME!!!1! • Now that we have the circuit assembled, open
thonny again and type in the following code: import picozero
• Note: the int value in "machine.Pin(16)" (16)
denotes which GPIO pin we are referencing. led_pin = machine.
• Note 2: multipython has several options for Pin(16)
setting the state of a pin:
• To turn the pin off: led_pin.value(1)
◦ pin.value(0) (or) pin.on()
• To turn the pin on: ◦ pin.value(1) or pin.on()
• (pin is just the name of the desired variable defined earlier in the script. led_pin in the shown example) 83 / 110 ██ What does "pulldown" / "pullup" mean? 84 / 110 ██ What does "pulldown" / "pullup" mean? • When reading electrical signals, it is often necssary to deal with interference which may cause false readings. 85 / 110 ██ What does "pulldown" / "pullup" mean? • When reading electrical signals, it is often necssary to deal with interference which may cause false readings. ◦ This is why we "pull" an input pin to a certain point. 86 / 110 ██ What does "pulldown" / "pullup" mean? • When reading electrical signals, it is often necssary to deal with interference which may cause false readings. ◦ This is why we "pull" an input pin to a certain point. • To "pull-up" a pin, means to make it so that the default state of that pin is 1 (or +V). 87 / 110 ██ What does "pulldown" / "pullup" mean? • When reading electrical signals, it is often necssary to deal with interference which may cause false readings. ◦ This is why we "pull" an input pin to a certain point. • To "pull-up" a pin, means to make it so that the default state of that pin is 1 (or +V). ◦ Thus, if our button closes the circuit to ground when pressed, the pin will be pulled low (0v) which is easily distinguishable from the default state of 1 88 / 110 ██ What does "pulldown" / "pullup" mean? • When reading electrical signals, it is often necssary to deal with interference which may cause false readings. ◦ This is why we "pull" an input pin to a certain point. • To "pull-up" a pin, means to make it so that the default state of that pin is 1 (or +V). ◦ Thus, if our button closes the circuit to ground when pressed, the pin will be pulled low (0v) which is easily distinguishable from the default state of 1 • Pulling down, which is somewhat more common does the opposite, making the default state 0, for the pin to be pulled HIGH (1/+V) when the button is pressed 89 / 110 ██ What does "pulldown" / "pullup" mean? • When reading electrical signals, it is often necssary to deal with interference which may cause false readings. ◦ This is why we "pull" an input pin to a certain point. • To "pull-up" a pin, means to make it so that the default state of that pin is 1 (or +V). ◦ Thus, if our button closes the circuit to ground when pressed, the pin will be pulled low (0v) which is easily distinguishable from the default state of 1 • Pulling down, which is somewhat more common does the opposite, making the default state 0, for the pin to be pulled HIGH (1/+V) when the button is pressed 90 / 110 ██ Quick note 91 / 110 ██ Quick note • Due to a hardware error on the RP2350, the internal PULL-DOWN resistors do not function properly. 92 / 110 ██ Quick note • Due to a hardware error on the RP2350, the internal PULL-DOWN resistors do not function properly. • If, for a future project you need to use a pulldown resistor 93 / 110 ██ Quick note • Due to a hardware error on the RP2350, the internal PULL-DOWN resistors do not function properly. • If, for a future project you need to use a pulldown resistor ◦ It is easy to provide your own by simply putting a low-resistance resistor between your input pin and GND 94 / 110 ██ Quick note • Due to a hardware error on the RP2350, the internal PULL-DOWN resistors do not function properly. • If, for a future project you need to use a pulldown resistor ◦ It is easy to provide your own by simply putting a low-resistance resistor between your input pin and GND • For now, we will just use PULLUP instead as it doesnt change much for our circuit 95 / 110 ██ Quick note • Due to a hardware error on the RP2350, the internal PULL-DOWN resistors do not function properly. • If, for a future project you need to use a pulldown resistor ◦ It is easy to provide your own by simply putting a low-resistance resistor between your input pin and GND • For now, we will just use PULLUP instead as it doesnt change much for our circuit 96 / 110 ██ Assembling the button circuit 1. Place the Button across the division in the breadboard 2. On one corner of the button, attach a cable to the ground rail 3. On the opposite, diagonal corner of the button, attach a cable to pin 16 97 / 110 ██ Circuit diagram 98 / 110 ██ Code for the button 99 / 110 ██ Code for the button • Line 5: In this line we define a variable for our input pin, defining it as pin 16, an input pin, and enabling the pull_up function 100 / 110 ██ Code for the button • Line 5: In this line we define a variable for our input pin, defining it as pin 16, an input pin, and enabling the pull_up function • The time.sleep present in line
15 is added because we are flooding the terminal with text as this script runs very quickly, this can easily cause an overflow, thus we add a sleep function to clean up the output a bit and make it more responsive 101 / 110 ██ Code for the button • Line 5: In this line we define a
variable for our input pin, import picozero
defining it as pin 16, an input from machine import Pin
pin, and enabling the pull_up import time
function
• The time.sleep present in line button_pin = Pin(16, Pin.IN, Pin.
15 is added because we are PULL_UP)
flooding the terminal with text
as this script runs very while True:
quickly, this can easily cause value = button_pin.value()
an overflow, thus we add a sleep if value == 0:
function to clean up the output print("button is pressed")
a bit and make it more picozero.pico_led.on()
responsive else:
print("button is not
pressed")
picozero.pico_led.off()
time.sleep(0.25)
102 / 110 ██ Extra ▓▓▓ If we have time Start with the previously assembled button circuit, your breadboard should look like this: 103 / 110 ██ Add your LED! 104 / 110 ██ Add your LED! • Now, I’d like you to add your LED from earlier to this circuit, wired to GPIO pin 16! 105 / 110 ██ Add your LED! • Now, I’d like you to add your LED from earlier to this circuit, wired to GPIO pin 16! • Do this on your own and call out if you need help! 106 / 110 ██ Add your LED! • Now, I’d like you to add your LED from earlier to this circuit, wired to GPIO pin 16! • Do this on your own and call out if you need help! 107 / 110 ██ Final circuit diagram! Your circuit should look something like this: 108 / 110 ██ Code time import picozero
from machine import Pin
import time
butn = machine.Pin(17, Pin.IN, Pin.PULL_UP)
led = machine.Pin(16, Pin.OUT)
led.value(0)
latch = 0
while True:
if butn.value() == 0:
latch = not latch
led.value(latch)
time.sleep(0.1)
109 / 110 110 / 110