Skip to content

asder8215/ESP32-SpaceTeam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-SpaceTeam

Creative Embedded System Module 3 Project: This project uses the TFT_eSPI, WiFi.h, esp_now.h, and SPI.h libraries with the Lilygo TTGO ESP32 and Arduino IDE to play a 2 vs. 2 SpaceTeam game with your friends.

Demo

Creative Embedded Module Project 3

Blog Post

You can take an in depth look at our process making this program in this following blog posts

Table of Contents

Features and Tools

How to Build the Project

1. Clone the repository for each player:

git clone https://github.com/asder8215/ESP32-SpaceTeam.git

2. Move the espaceteam.ino File

From the espaceteam folder, import or move the espaceteam.ino file into your Arduino Folder. If Arduino IDE is not installed, look at this Arduino Support Page on how to install the Arduino IDE.

3. Set Up the Required Libraries

Follow these installation steps to correctly set up the libraries needed to write and run code for TTGO ESP32.

4. Upload the Code

Once your Arduino IDE is set up, you can connect your ESP32 to your laptop or computer via USB-C and click on the Upload button on the top left of the Arduino IDE. This will make the code compile and store onto the ESP32.

5. After Uploading the Code

Once the code is uploaded, the ESP32 will display prompts asking you to use the left and right buttons to choose your name, room, and team. This process allows four players to be divided into two teams to play against each other.

  • Name Selection Screen:

    • Short press (left button): Scroll through letters A-Z.
    • Short press (right button): Confirm the current character and move to the next character.
    • Long press (right button): Confirm the name (three letters long).
  • Room Selection Screen:

    • Short press (left button): Scroll through numbers 0-9.

    • Long press (left button): Move back to the name screen.

    • Short press (right button): Confirm the current digit and move to the next digit.

    • Long press (right button): Confirm the room number (four digits long).

      ⚠️ Ensure all players enter the same room number to join the same game.

  • Team Selection Screen:

    • Short press (left button): Toggle between Team A and Team B.

    • Long press (left button): Exit the team screen and return to the room selection screen.

    • Short press (right button): Toggle the readiness status of the local player.

    • Long press (right button): Attempt to start the game (only if conditions are met).

      ⚠️ The game will only start when both teams have at least two players and all players are marked as ready.

6. Start Playing the Game

Each player will see one top command and two button commands displayed on their ESP32 screen. Players must shout out their top command, prompting their partner to press the corresponding left or right button if the command matches one of their button commands. The goal is for each team to collaborate internally while competing against the opposing team to reach a score of 10 (each correct command adds +1 to the respective team's score).

  • Left Short Press: Select the player’s command 1 option and notify the other ESP32 device that this command was chosen.
  • Right Short Press: Select the player’s command 2 option and notify the other ESP32 device that this command was chosen.

7. End of the Game

The game concludes when one team reaches 10 points first. All players are notified of the winning team.

  • Rematch: Press the left button to re-enter the team selection process and set up a new game.
  • Exit: Press the right button to leave the current game session and return to the name selection screen.

If you are unsure of how to play the game or want a quick guide, refer to the demo above to see how it works!

Concept Design

These contain images of our SpaceTeam concept design. Some of these images may not be implemented or changed on how it works/shown in the game as it is currently.

  • Name, Room, and Team Screens Initial Screen
  • Game Screen Game Screen
  • End Screen End Screens

Contributors

  • Mahdi Ali-Raihan
  • Enrista Ilo
  • Christine Lam
  • Jie Ji

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages