Home > Articles > Sean's Raspberry Pi coding tutorials

Sean's Raspberry Pi coding tutorials

Raspberry Pi tutorials and teaching resources

Some of the resources here are from The MagPi magazine and are reproduced with permission. Please subscribe or buy at your newsagent to support the magazine!

Coding Compendium

Coding Compendium

This free 100-page ebook includes tutorials and projects for Scratch, Python, Raspberry Pi and microbit.

An illustration of a man sat cross-legged on a giant laptop keyboard, clutching a bundle of downloaded documents.

Webpage downloader

Use Python to download multiple webpages into an office document you can easily search or edit.

An illustration of a woman looking at shelves of library books with a magnifying glass

Python PDF Searcher

See how to search PDF files in Python and output the results to a text file.

The photo shows strips of paper with Morse code messages stamped into them

Morse code transmitter

Send messages with an LED using the famous code of short and long flashes.

A four-digit display wired up to a Raspberry Pi on a breadboard, showing 2 hours and 33 minutes remaining

Time travel experiments

I created a progress calendar and countdown clock using Python's datetime module.

Bedtime Stories: handheld screen showing an AI generated image of an astronaut

Bedtime Stories

ChatGPT and Stable Diffusion create illustrated stories to your specification on this Raspberry Pi project.

Stable Diffusion Python code example

Create images with Stable Diffusion AI

My simple Python program shows you how to use DeepAI's API to generate images using AI and download them.

Press Play Sound Pack

Press Play: Sound Pack

I've created a collection of music loops and sound effects for your Scratch and Python games. Includes instructions!

Download Dad jokes

Download random Dad jokes in Python

This short program uses the icanhazdadjoke API to download random jokes and read them out loud.

Raspberry Radio

Raspberry Radio

Raspberry Radio creates a virtual DJ that introduces your MP3s before playing them, and reads out the news and weather.

PiGlow board for Raspberry Pi

PiGlow Disco Lights

Add LEDs to your Raspberry Pi that animate while music plays. This is a great add-on for Raspberry Radio.

News headlines on a Display-O-Tron HAT


Newsreader is a Python program that downloads the news using RSS and the weather using an API.



ArtEvolver creates digital art by blending slides of textures, shapes, and colours together.

Sense HAT game photo

Using a Sense HAT in Scratch

Use a Raspberry Pi Sense HAT to control a car in this top-down racing game. I coded this game using Scratch 3.

Unicorn HAT text scroller

Unicorn HAT text scroller

This Python project scrolls text across Pimoroni's Unicorn HAT. This article was published in issue 34 of The MagPi.

Clef Hero

Raspberry Pi Clef Hero

This Python game for Pimoroni's Piano HAT add-on teaches you to read sheet music. I wrote this for issue 43 of The MagPi.

Raspberry Pi Starter Guide

Raspberry Pi Starter Guide

This 10-page feature from Issue 84 of The MagPi introduces the Raspbian desktop, some awesome applications, programming tools, and how to use SSH and VNC for remote access.

Learn to Code

Learn to Code

This 12-page feature from The MagPi introduces Scratch and shows you how to build a simple game, before moving on to Python and electronics.

Google A.I.Y. Kit for Raspberry Pi

Google AIY Kit for Raspberry Pi

Here's a blog I wrote about assembling the Google AIY Kit for Raspberry Pi, originally given away with The MagPi magazine.


Using the PiCube

Watch my video demo of the PiCube from SB Components, and see the Python code I used to create it.


Adding gesture control with Flick

The Flick family of Raspberry Pi add-ons can be used to add gesture control to your Raspberry Pi, including taps and flicks.

Sonic Pi

Make music with Sonic Pi

Sonic Pi is a programming language for creating music. Here's the code for an extended version of the tune from the 2nd edition of Raspberry Pi For Dummies.

Scratch notes infographic

Scratch and Sonic Pi notes

This infographic shows the musical note numbers in Scratch and Sonic Pi to make it easier to program tunes.

aspberry Pi history blog

A short history of the Raspberry Pi

Way back in 2012, the year the Raspberry Pi launched, I attended a talk by Eben Upton about how it came to be.

Pygame Zero

Pygame Zero

This article from the launch of Pygame Zero introduces the library that makes Pygame easier to use in education. Pygame Zero is used in my book Mission Python.

Scratch cat with balloons invites you to visit my Scratch resources

Sean's Scratch Resources

Find many more Scratch tutorials, sprite packs, and tips in my dedicated Scratch Resources section.

Free chapters from my Raspberry Pi related books (PDFs)

Scratch Programming in Easy Steps

Scratch Programming IES

Scratch is a popular first programming language on the Raspberry Pi. The free sample PDF chapter introduces you to Scratch and shows you how to make your first project. This book has been updated for Scratch 3.

Cool Scratch Projects in Easy Steps

Cool Scratch Projects IES

Want to take Scratch beyond the basics? This book comes with 3D glasses and features projects using them. Use this free PDF sample to create the first project in the book, Magic Mirror.

Raspberry Pi For Dummies

Raspberry Pi For Dummies

This book sampler for Raspberry Pi For Dummies includes a guide to Scratch 1.4 and Scratch 2 on the Raspberry Pi. The full book includes a project to build a simple arcade game in Scratch.

Inspiring Raspberry Pi projects



Read my review of Picade, Pimoroni's arcade cabinet kit for the Raspberry Pi. Play classic arcade, console and home computer games using Retropie.

The Next Verse

The Next Verse

This project uses the Raspberry Pi to add a soundtrack to a visual artwork that depicts the cycle of life. It was created by Stewart Easton and Gawain Hewitt.

Raspberry Pi Summer Projects

Raspberry Pi Summer Projects

Be inspired by this round-up of outdoors projects including a weather station, a high-altitude balloon, and a motorised skateboard.

MIDI Mutant

MIDI Mutant

Musician Aphex Twin worked with Dave Griffiths to make a Raspberry Pi project that programs new sounds for the Yamaha DX7 synthesiser.

Raspberry Pi Weekend Projects

Raspberry Pi Weekend Projects

Ideas for Raspberry Pi projects you can complete in a weeekend, including a smart fridge, walkie-talkie, and robot.



BBC Box uses a Raspberry Pi to store your data locally, so you can get personalised services without giving away all your personal information.

What is a Raspberry Pi?

Four Royal Mail postage stamps with a Raspberry Pi image on themThe Raspberry Pi is an affordable and hackable computer. It's a single board computer, about the size of a credit card, that has general purpose input/output (GPIO) pins you can use to connect add-ons and your own electronic circuits. It runs on the free and open source Linux operating system, and it's great for learning to program.

The Raspberry Pi was invented to promote computer science education, but has an enthusiastic ecosystem of hobbyists using it for their inventions and technology projects.

There are several models of Raspberry Pi. The Raspberry Pi 4 is the latest version of the full board device, and it's available with up to 8GB of memory. Prices start at around £35. If you're planning to use the Raspberry Pi on your desktop, the Raspberry Pi 400 houses the computer inside a keyboard.

The Raspberry Pi Zero is a tiny computer that costs around £10. It's good for lower powered or space-constrained projects. The first the world saw of it was when it was given away for free on the cover of The MagPi magazine. More recently, the Raspberry Pi Foundation has launched the Raspberry Pi Pico, which is a microcontroller like an Arduino, rather than a computer.

In 2019, Royal Mail celebrated the Raspberry Pi with its own stamp (see my photo on the right). More than 45 million Raspberry Pis had been sold by August 2022.

This part of my website collects together the Raspberry Pi tutorials and articles I've written.

Find out more

Learn to set up and use your Raspberry Pi with my book Raspberry Pi For Dummies, co-authored with Mike Cook. Learn Python with my book Mission Python, which shows you how to create a space adventure game. For help with Scratch, see my books Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps.


Articles from The MagPi reproduced under a Creative Commons licence, with thanks to The MagPi team. You can support the magazine by buying a copy in your newsagent, or subscribing. Yamaha DX7 image by Flickr user deepsonic (CC BY 2.0).


© Sean McManus. All rights reserved.

Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!

Discover my latest books

Coding Compendium

Coding Compendium

A free 100-page ebook collecting my projects and tutorials for Raspberry Pi, micro:bit, Scratch and Python. Simply join my newsletter to download it.

Web Design in Easy Steps

Web Design IES

Web Design in Easy Steps, now in its 7th Edition, shows you how to make effective websites that work on any device.

100 Top Tips: Microsoft Excel

100 Top Tips: Microsoft Excel

Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.

Scratch Programming in Easy Steps

Scratch Programming IES

This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Newsletter | Blog | Copywriting Services | Books | Free book chapters | Articles | Music | Photos | Games | Shop | About