Classic Tetris game running on a Raspberry Pi Pico microcontroller.
Pico C port by Richard Birkby
- 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
$ 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 ../
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
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
Install and select
Extensions: Install Extensions.
Make sure you install:
- CMake Tools
- Cortex-Debug (optional: for debugging via a Picoprobe or Pi GPIO)
- Markdown All in One (recommended: for preparing your own README.md)
printf debugging on MacOS with:
$ brew install minicom $ minicom -b 115200 -o -D /dev/tty.usbmodem0000000000001