This project implements a Dino-Game using the STM32F401RE development board, a 16x2 LCD display, and a joystick sensor. The game features a simple interface where a dinosaur dodges obstacles. This repository includes all the necessary code and documentation to recreate the project.
- STM32CubeMX (for initial configuration)
- STM32CubeIDE or Keil uVision (for coding and debugging)
- HAL (Hardware Abstraction Layer) libraries
Before to connect HW, take a look on the pin legends of the boards
Take a look also at the pin analog and digital that we need to connect
Joystick Pin | STM32 Board Pin > Pin CubeMX Config | Connection Diagram |
---|---|---|
VRx | A5 > PC_0 | |
VRy | A4 > PC_1 | |
SW | D2 > PA_10 | |
GND | GND pin of Board |
After you have connected all the wires and the sensor to the board, as shown in the schema, you can clone our repository and install the program on your board using STM32CubeIDE.
NOTE : If you want do the setup on your own , you can skip this and follow an example of settings that we show, click on Do on your own!
Repository: Dino-Game
- Open GitHub Desktop.
- Click on
File
>Clone repository
. - Paste the repository URL:
https://github.com/habeslab/Dino-Game.git
. - Choose the local path where you want to clone the repository.
- Click on
Clone
.
-
Open Command Prompt.
-
Navigate to the directory where you want to clone the repository.
cd path\to\your\directory
-
Clone the repository:
git clone https://github.com/habeslab/Dino-Game.git
-
Open Terminal.
-
Navigate to the directory where you want to clone the repository.
cd path/to/your/directory
-
Clone the repository:
git clone https://github.com/habeslab/Dino-Game.git
- Open STM32CubeIDE.
- Click on
File
>Import
. - Select
General
>Existing Projects into Workspace
and clickNext
. - Browse to the location where you cloned the repository and click
Finish
. - The project should now be imported into your workspace.
- Connect your STM32F401RE board to your computer via USB.
- In STM32CubeIDE, select the project in the Project Explorer.
- Click on the
Build
button (hammer icon) to compile the project. - Once the build is successful, click on the
Run
button (green play icon) to flash the program onto your STM32F401RE board.
Now, your STM32F401RE board should be running the Dino-Game program. Enjoy!
Contributions are welcome! Please feel free to contact us or open an issue to improve the game or add new features.
This project is licensed under the MIT License. See the LICENSE file for details.