Tetris on a Raspberry Pi Pico mounted on a Pimoroni Pico Explorer

Overview

PicoTetris

Classic Tetris game running on a Raspberry Pi Pico microcontroller.

Pico C port by Richard Birkby

Original JavaScript implementation - Jake Gordon

Video

https://www.youtube.com/watch?v=YCEuKoBeN7E

Requirements

  • Raspberry Pi Pico (with headers)
  • Pimoroni Pico Explorer board.

Preparing your build environment

Install build requirements (Linux):

sudo apt update
sudo apt install cmake gcc-arm-none-eabi build-essential

MacOS:

$ brew install cmake
$ brew tap ArmMbed/homebrew-formulae
$ brew install arm-none-eabi-gcc

And the Pico SDK:

git clone https://github.com/raspberrypi/pico-sdk
cd pico-sdk
git submodule update --init
export PICO_SDK_PATH=`pwd`
cd ../

The PICO_SDK_PATH set above will only last the duration of your session.

You should should ensure your PICO_SDK_PATH environment variable is set by ~/.profile:

export PICO_SDK_PATH="/path/to/pico-sdk"

Grab the Pimoroni libraries

git clone https://github.com/pimoroni/pimoroni-pico

And then (assuming pico-sdk is alongside your project):

ln -s ../pico-sdk/external/pico_sdk_import.cmake .

If you have not or don't want to set PICO_SDK_PATH you can edit .vscode/settings.json to pass the path directly to CMake.

Prepare Visual Studio Code

Open VS Code and hit Ctrl+Shift+P.

Type Install and select Extensions: Install Extensions.

Make sure you install:

  1. C/C++
  2. CMake
  3. CMake Tools
  4. Cortex-Debug (optional: for debugging via a Picoprobe or Pi GPIO)
  5. Markdown All in One (recommended: for preparing your own README.md)

Debugging

printf debugging on MacOS with:

$ brew install minicom
$ minicom -b 115200 -o -D /dev/tty.usbmodem0000000000001

Licence

MIT licensed

You might also like...
built-in CMSIS-DAP debugger tailored especially for the RP2040 “Raspberry Pi Pico”

RP2040 has two ARM Cortex-M0+ cores, and the second core normally remains dormant. pico-debug runs on one core in a RP2040 and provides a USB CMSIS-DAP interface to debug the other core. No hardware is added; it is as if there were a virtual debug pod built-in.

🦠 µnix is a UNIX-like operating system for the raspberry pi pico.
🦠 µnix is a UNIX-like operating system for the raspberry pi pico.

The µnix Operating System "µnix", "munix" or, "micro unix" aims to be a micro kernel based operating system targeting the Raspberry Pi Pico. "µnix" is

Fractal rendering for Raspberry Pi Pico microcontroller

picofract Mandelbrot Set rendering demo for Raspberry Pi Pico microcontroller with Pico Display Pack. Building If you already have the Pimoroni SDK bu

Arduino API for the Raspberry Pico

Raspberry PI Pico - Arduino API On Friday I was receiving my Raspberry PI Pico and I had the opportunity to play around with it. Actually most of the

x86 emulator on Raspberry Pi Pico
x86 emulator on Raspberry Pi Pico

picox86 x86 emulator on Raspberry Pi Pico https://user-images.githubusercontent.com/10139098/110543817-13299080-812b-11eb-9c88-674cdae919fc.mp4 PCB fr

A laser cut Dreamcast Pop'n Music controller and integrated memory card using the Raspberry Pi Pico's Programmable IO
A laser cut Dreamcast Pop'n Music controller and integrated memory card using the Raspberry Pi Pico's Programmable IO

Dreamcast Pop'n Music Controller Using Raspbery Pi Pico (RP2040) Intro This is a homebrew controller for playing the Pop'n Music games on the Sega Dre

Web Server based on the Raspberry Pico using an ESP8266 with AT firmware for WiFi
Web Server based on the Raspberry Pico using an ESP8266 with AT firmware for WiFi

PicoWebServer This program runs on a Raspberry Pico RP2040 to provide a web server when connected to an Espressif ESP8266. This allows the Pico to be

Raspberry Pi Pico Arduino core, for all RP2040 boards
Raspberry Pi Pico Arduino core, for all RP2040 boards

Arduino-Pico Raspberry Pi Pico Arduino core, for all RP2040 boards This is a port of the RP2040 (Raspberry Pi Pico processor) to the Arduino ecosystem

A programming environment for Lua for the Raspberry Pi Pico microcontroller

picolua A programming environment for Lua for the Raspberry Pi Pico microcontroller. Version 0.3, April 2021 What is this? picolua is a proof-of-conce

Comments
Owner
Richard Birkby
Richard Birkby
Digital rain animation gif with glow squeezed into a raspberry pi pico and pimoroni pico-display

pico-display-matrix Digital rain animation gif with glow squeezed into a raspberry pi pico and pimoroni pico-display or how to actually use all Flash

null 32 Sep 10, 2022
TETRIS-OS: An operating system that only plays Tetris.

TETRIS-OS: An operating system that only plays Tetris.

null 3.5k Jul 14, 2021
stacked acrylic gasket mounted ergonomic keyboard

Splay46 Build guide This keyboard requires soldering of really small smd components like USB Type C Receptacle(0.3mm pitch), Atmega32U4(0.8mm pitch),

kobakos 41 Jan 6, 2023
Prueba del Raspberry PI PICO con un display Raspberry PI TFT 3.5"

Raspberry-PI-PICO-display-RPI35 Prueba del Raspberry PI PICO con un display Raspberry PI TFT 3.5" Con ayuda de la libreria https://github.com/khoih-pr

null 1 Nov 10, 2021
Pico-uart-bridge - Raspberry Pi Pico UART-USB bridge

Raspberry Pi Pico USB-UART Bridge This program bridges the Raspberry Pi Pico HW UARTs to two independent USB CDC serial devices in order to behave lik

Álvaro Fernández Rojas 156 Dec 23, 2022
Tetris bot

Lemon Tea Guildline versus tetris bot How to build Notices Lemon Tea makes use of standard library header <bit> available in C++20, so make sure your

null 5 Aug 18, 2022
A version of Tetris with randomly generated polyominoes of varying sizes

Multris A version of Tetris with randomly generated polyominoes of varying sizes ----- CONTROLS ----- LEFT / RIGHT ARROW - Move. Hold to move quicker.

null 17 Nov 5, 2022
An AI for playing NES Tetris at a high level. Based primarily on search & heuristic, with high quality board evaluation through value iteration.

StackRabbit An AI that plays NES Tetris at a high level. Primarily based on search & heuristic, with high-quality board eval through value iteration.

Greg Cannon 244 Jan 5, 2023
Simple Tetris clone written in C++ using SFML

stetris Simple Tetris clone written in C++ using SFML. The game has been tested only on GNU/Linux system so far. Building dependencies (on Linux) g++

sewe2000 3 Jun 14, 2022
Raspberry Pi Pico (RP2040) and Micro-ROS (ROS 2) Integration

The Pico is an amazing microcontroller and I couldn't wait for ROS 2 support or Arduino Core, so here is my approach. Once the Arduino Core for RP2040 is out it will be easier to use micro_ros_arduino.

Darko Lukić 19 Jun 19, 2022