My attempt at making a minimalistic clone of the Chrome Dino game on a Hitachi HD44780 display using a Raspberry Pi Pico.
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).
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};
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.
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.