Skip to content

This project uses the STM32F401RE board to develop a Dino-Game with a 16x2 LCD display and a joystick sensor. The joystick controls the dinosaur, and the LCD shows custom characters for an interactive gaming experience. This repository includes the code and documentation needed to recreate the project.

License

Notifications You must be signed in to change notification settings

habeslab/Dino-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦖 Dino-Game on STM32 🦖

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.

Table of Contents

Hardware Requirements ⚙️

Component Description Image
STM32F401RE Nucleo board Board STM32
16x2 QAPASS LCD LCD display Qapass Datasheet
Joystick Sensor Sensor for capturing joystick movements Arduino Joystick
Breadboard Breadboard for making connections Breadboard
Jumper Wires Wires for making connections Jumper Wires
Potentiometer For adjusting LCD contrast Potentiometer

Software Requirements #️⃣

  • STM32CubeMX (for initial configuration)
  • STM32CubeIDE or Keil uVision (for coding and debugging)
  • HAL (Hardware Abstraction Layer) libraries

Hardware Setup ♾️

Before to connect HW, take a look on the pin legends of the boards

Pin Legends

Take a look also at the pin analog and digital that we need to connect

Analog Pin Details Digital Pin Details

1. Connecting LCD display to STM32 board

LCD Display Pin STM32 Board Pin > Pin CubeMX Config Connection Diagram
VSS GND Connecting STM32Board to LCD
VDD 5V
V0 Potentiometer (for contrast control)
RS D4 > PB_5
RW GND
E D5 > PB_4
D4 D9 > PC_7
D5 D10 > PB_6
D6 D11 > PA_7
D7 D12 > PA_6
A 3.3V
K GND

2. Connecting Joystick Sensor to STM32 board

Joystick Pin STM32 Board Pin > Pin CubeMX Config Connection Diagram
VRx A5 > PC_0 Connecting STM32Board to Joystick
VRy A4 > PC_1
SW D2 > PA_10
GND GND pin of Board

Hardware Connection

3. Install and Use 🎮

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

Using GitHub Desktop

  1. Open GitHub Desktop.
  2. Click on File > Clone repository.
  3. Paste the repository URL: https://github.com/habeslab/Dino-Game.git.
  4. Choose the local path where you want to clone the repository.
  5. Click on Clone.

Using Command Line on Windows

  1. Open Command Prompt.

  2. Navigate to the directory where you want to clone the repository.

    cd path\to\your\directory
  3. Clone the repository:

    git clone https://github.com/habeslab/Dino-Game.git

Using Command Line on Linux

  1. Open Terminal.

  2. Navigate to the directory where you want to clone the repository.

    cd path/to/your/directory
  3. Clone the repository:

    git clone https://github.com/habeslab/Dino-Game.git

Importing the Project into STM32CubeIDE

  1. Open STM32CubeIDE.
  2. Click on File > Import.
  3. Select General > Existing Projects into Workspace and click Next.
  4. Browse to the location where you cloned the repository and click Finish.
  5. The project should now be imported into your workspace.

Building and Flashing the Project

  1. Connect your STM32F401RE board to your computer via USB.
  2. In STM32CubeIDE, select the project in the Project Explorer.
  3. Click on the Build button (hammer icon) to compile the project.
  4. 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!

Contributing 🙋🏻

Contributions are welcome! Please feel free to contact us or open an issue to improve the game or add new features.

License ©️

This project is licensed under the MIT License. See the LICENSE file for details.

About

This project uses the STM32F401RE board to develop a Dino-Game with a 16x2 LCD display and a joystick sensor. The joystick controls the dinosaur, and the LCD shows custom characters for an interactive gaming experience. This repository includes the code and documentation needed to recreate the project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published