Skip to content

A minimalistic clone of the Chrome Dino game on a Hitachi HD44780 display using a Raspberry Pi Pico and the BOOTSEL button as input.

License

Notifications You must be signed in to change notification settings

turtureanu/pico-dino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dino game on a Raspberry Pi Pico

My attempt at making a minimalistic clone of the Chrome Dino game on a Hitachi HD44780 display using a Raspberry Pi Pico.

Where's the input?

The game requires only one input: a click/tap.

We could use a normal button and wire it on the breadboard, but in this case, I chose to use the BOOTSEL button on the picoboard (using code copied from the pico-examples repository).

Wiring

The wiring corresponds to the variable LCDpins, which takes the GPIO pin numbers as array values.

// D0, D1, D2, D3, D4, D5, D6, D7, E, RS, RW, LCD columns, LCD rows
int LCDpins[14] = {12, 11, 10, 9, 8, 7, 6, 5, 13, 15, 14, 16, 2};

Wiring diagram on a breadboard

Flowchart

Building

I make use of the newer pico_rand API from the Pico SDK, which has been merged (#1111) into and is, as of now (2023/28/1), only available on the development branch of the Pico SDK repository.

mkdir pico # directory with the SDK and this project
cd pico

# clone the SDK which is on the 'develop' branch
git clone https://github.com/raspberrypi/pico-sdk.git -b develop

# clone this repo
git clone https://github.com/turtureanu/pico-dino.git

export PICO_SDK_PATH=$(realpath pico-sdk) # export the SDK, so we can use it when building
cd pico-dino
mkdir build
cd build
cmake ../
make

For generating the Doxygen documentation (to include the pico_rand API) see Appendix E of the Pico SDK documentation.

Licensing

This project is licensed under the BSD 3-Clause "New" or "Revised" License.

This project makes use of code from the Raspberry Pi Pico SDK Examples GitHub repository.

This project uses the picoLCD library.

About

A minimalistic clone of the Chrome Dino game on a Hitachi HD44780 display using a Raspberry Pi Pico and the BOOTSEL button as input.

Topics

Resources

License

Stars

Watchers

Forks