Build real electronics projects with Raspberry Pi Pico โ LED Morse Code & LCD Pi Digits. Everything you need is in the Make: Radio Component Kit.
Monday, March 17 at 2:30 PM EST โ Follow to get notified!
Follow @ProTechTrader on TikTok โWe'll demo both experiments live and answer your questions!
A green LED blinks the digits of Pi (3.14159...) in Morse code. Short flash = dot, long flash = dash. Green LED ties into St. Patrick's Day too! ๐
| Component | Value | In Kit? | Notes |
|---|---|---|---|
| Raspberry Pi Pico | RP2040 | โ | Kit includes 2 |
| LED | Green, 3mm or 5mm | โ | Green for St. Paddy's! |
| Resistor | 220ฮฉ (Red-Red-Brown) | โ | Current limiter โ required! |
| Jumper Wire | 1 piece | โ | LED cathode to GND |
| Breadboard | Solderless | โ | Kit includes 2 |
# pi_morse.py รขโฌโ Blink Pi digits in Morse Code
# Pi Day TikTok Livestream รขโฌโ ProTechTrader Make: Radio Kit Demo
# Upload to Pico #1, run with Thonny
from machine import Pin
from time import sleep
led = Pin(15, Pin.OUT) # GP15
# Morse code timing (seconds)
DOT = 0.15 # Short flash
DASH = 0.45 # Long flash (3x dot)
SYMBOL_GAP = 0.15 # Gap between dots/dashes
CHAR_GAP = 0.45 # Gap between digits
WORD_GAP = 1.0 # Gap between repetitions
# Morse code for digits 0-9 + decimal point
MORSE = {
'0': '-----', # 5 dashes
'1': '.----', # 1 dot, 4 dashes
'2': '..---', # 2 dots, 3 dashes
'3': '...--', # 3 dots, 2 dashes
'4': '....-', # 4 dots, 1 dash
'5': '.....', # 5 dots
'6': '-....', # 1 dash, 4 dots
'7': '--...', # 2 dashes, 3 dots
'8': '---..', # 3 dashes, 2 dots
'9': '----.', # 4 dashes, 1 dot
'.': '.-.-.-', # Decimal point
}
PI_DIGITS = "3.14159265358979323846"
def blink_morse(char):
"""Blink one character in Morse code"""
pattern = MORSE.get(char, '')
for i, symbol in enumerate(pattern):
led.on()
if symbol == '.':
sleep(DOT)
else:
sleep(DASH)
led.off()
if i < len(pattern) - 1:
sleep(SYMBOL_GAP)
def main():
print("=== Pi Day Morse Code ===")
print(f"Blinking: {PI_DIGITS}")
print("Dot = short flash, Dash = long flash")
print("Watch the LED on GP15!")
print()
while True:
for char in PI_DIGITS:
morse = MORSE.get(char, '?')
print(f" {char} {morse}")
blink_morse(char)
sleep(CHAR_GAP)
print("\n--- Looping ---\n")
sleep(WORD_GAP)
main()
The 1602 LCD screen scrolls the first 100 digits of Pi infinitely. Shows a "Pi Day 2026! / ProTechTrader" splash screen on startup. Very visual for camera!
| Component | Value | In Kit? | Notes |
|---|---|---|---|
| Raspberry Pi Pico | RP2040 | โ | Use 2nd Pico from kit |
| 1602 LCD + I2C Backpack | 16ร2 characters | โ | Must have I2C adapter on back |
| Jumper Wires | 4 pieces | โ | VCC, GND, SDA, SCL |
| Breadboard | Solderless | โ | Use 2nd from kit |
Click any image to view full size. Use these as a visual guide while wiring.
Physical pin numbers (1-40). The 4 highlighted rows are the only pins you need for this experiment.
| โฌ USB PORT โฌ | ||||||
| GP0 | 1 | โ | โ | โ | 40 | VBUS โ RED wire (5V) |
| GP1 | 2 | โ | โ | โ | 39 | VSYS |
| GND | 3 | โ | โ | โ | 38 | GND โ BLACK wire |
| GP2 | 4 | โ | โ | โ | 37 | 3V3_EN |
| GP3 | 5 | โ | โ | โ | 36 | 3V3 (OUT) |
| GP4 (SDA) | 6 | โ | โ | โ | 35 | ADC_VREF |
| GP5 (SCL) | 7 | โ | โ | โ | 34 | GP28 |
| GND | 8 | โ | โ | โ | 33 | GND |
| GP6 | 9 | โ | โ | โ | 32 | GP27 |
| GP7 | 10 | โ | โ | โ | 31 | GP26 |
| GP8 | 11 | โ | โ | โ | 30 | RUN |
| GP9 | 12 | โ | โ | โ | 29 | GP22 |
| GND | 13 | โ | โ | โ | 28 | GND |
| GP10 | 14 | โ | โ | โ | 27 | GP21 |
| GP11 | 15 | โ | โ | โ | 26 | GP20 |
| GP12 | 16 | โ | โ | โ | 25 | GP19 |
| GP13 | 17 | โ | โ | โ | 24 | GP18 |
| GND | 18 | โ | โ | โ | 23 | GND |
| GP14 | 19 | โ | โ | โ | 22 | GP17 |
| GP15 | 20 | โ | โ | โ | 21 | GP16 |
Connect: Pin 6 SDA Pin 7 SCL Pin 38 GND Pin 40 VBUS
Never programmed before? No problem. Follow every step below and you'll have scrolling Pi digits in about 15 minutes.
.uf2 file (it will be near the top of the page)..uf2 file you downloaded onto this drive. The Pico will reboot automatically โ the drive will disappear. That's normal!>>> prompt at the bottom, you're connected! ๐You only need 4 jumper wires. The LCD module should already have the I2C backpack (small blue circuit board) soldered to the back.
USB Port
โโโโโโโโ
GP0 1 โโ โโ 40 VBUS โ 5V power!
GP1 2 โโ โโ 39 VSYS
GND 3 โโ โโ 38 GND โ Ground!
GP2 4 โโ โโ 37 3V3_EN
GP3 5 โโ โโ 36 3V3
GP4 6 โโ โโ 35 ADC_VREF
GP5 7 โโ โโ 34 GP28
GND 8 โโ โโ 33 GND
...etc
โโโโโโโโThe LCD needs two small helper files saved directly on the Pico before the main script will work.
lcd_api.py and click OK.pico_i2c_lcd.py.Found 1 device(s): Address: 0x27 โ Perfect! Wiring is correct.Address: 0x3F โ Also fine, but you'll need to change one line in the main script (instructions below).No I2C devices found! โ Check your wiring. Make sure VCC is on Pin 40 (VBUS), not Pin 36 (3V3).I2C_ADDR = 0x27 and change it to I2C_ADDR = 0x3F.main.py on the Pico. MicroPython automatically runs main.py on boot!Download these two files and save them TO the Pico via Thonny (File โ Save As โ Raspberry Pi Pico):
lcd_api.py on Picopico_i2c_lcd.py on Pico# i2c_scan.py รขโฌโ Find your LCD's I2C address
# Run this FIRST before pi_lcd.py to verify wiring!
# Most LCDs are 0x27, some are 0x3F
from machine import Pin, SoftI2C
i2c = SoftI2C(sda=Pin(4), scl=Pin(5), freq=400000)
devices = i2c.scan()
print("=== I2C Scanner ===")
if devices:
print(f"Found {len(devices)} device(s):")
for d in devices:
print(f" Address: {hex(d)} ({d})")
print()
if 0x27 in devices:
print("LCD at 0x27 รขโฌโ default, no code changes needed!")
elif 0x3F in devices:
print("LCD at 0x3F รขโฌโ change I2C_ADDR in pi_lcd.py to 0x3F")
else:
print("Unexpected address รขโฌโ update I2C_ADDR in pi_lcd.py")
else:
print("No I2C devices found!")
print("Check wiring:")
print(" SDA -> GP4 (Pin 6)")
print(" SCL -> GP5 (Pin 7)")
print(" VCC -> VBUS (Pin 40) รขโฌโ must be 5V!")
print(" GND -> GND (Pin 38)")
# pi_lcd.py รขโฌโ Scroll Pi digits on 1602 LCD
# Pi Day TikTok Livestream รขโฌโ ProTechTrader Make: Radio Kit Demo
# PREREQ: Upload lcd_api.py and pico_i2c_lcd.py to Pico first!
# Upload this to Pico #2, run with Thonny
from machine import Pin, SoftI2C
from pico_i2c_lcd import I2cLcd
from time import sleep
# --- CONFIG ---
I2C_ADDR = 0x27 # Most common. Change to 0x3F if yours is different
I2C_ROWS = 2
I2C_COLS = 16
SDA_PIN = 4 # GP4 (Pin 6)
SCL_PIN = 5 # GP5 (Pin 7)
SCROLL_SPEED = 0.3 # Seconds between scroll steps
# --- SETUP ---
i2c = SoftI2C(sda=Pin(SDA_PIN), scl=Pin(SCL_PIN), freq=400000)
lcd = I2cLcd(i2c, I2C_ADDR, I2C_ROWS, I2C_COLS)
# First 100 digits of Pi
PI = ("3.14159265358979323846264338327950288419716939937510"
"58209749445923078164062862089986280348253421170679")
def scroll_pi():
"""Scroll Pi digits across top row, static message on bottom"""
lcd.move_to(0, 1)
lcd.putstr(msg_display)
pos = 0
while True:
display = ""
for i in range(I2C_COLS):
display += PI[(pos + i) % len(PI)]
lcd.move_to(0, 0)
lcd.putstr(display)
pos = (pos + 1) % len(PI)
sleep(SCROLL_SPEED)
def main():
print("=== Pi Day LCD Display ===")
print(f"Scrolling {len(PI)} digits of Pi")
print(f"I2C Address: {hex(I2C_ADDR)}")
print(f"SDA: GP{SDA_PIN}, SCL: GP{SCL_PIN}")
print()
lcd.clear()
# Splash screen
lcd.move_to(0, 0)
lcd.putstr(" Pi Day 2026! ")
lcd.move_to(0, 1)
lcd.putstr(" @ProTechTrader ")
sleep(3)
lcd.clear()
scroll_pi()
main()
Two Raspberry Pi Picos โข 1602 LCD โข LEDs โข Resistors โข Breadboards โข FM Radio Module โข and more
Make: Radio Component Kit โ