Giter VIP home page Giter VIP logo

johnnylozano / memorygame Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.98 MB

Memory game built in C using a Nucleo-L476RG board and a SG92R micro servo motor to create a "Simon Says" style game where the board creates a random 5 angular pattern on the motor arm. The user must then match the pattern through the use of a button input and a blinking LED indicator.

C 98.22% Assembly 0.24% Makefile 1.54%

memorygame's Introduction

MemoryGame

Memory game built in C using a Nucleo-L476RG board and a SG92R micro servo motor to create a "Simon Says" style game where the board creates a random 5 angular pattern on the motor arm. The user must then match the pattern through the use of a button input and a blinking LED indicator.

Installation

Recommended to use STM32CubeIDE v 1.7.0

New file dropdown menu -> STM32 Project from an Existing STM32CubeMX Configuration File (.ioc). Use "MemoryGame.ioc" for this step. After the project loads, click on "MemoryGame.ioc", and click Build 'Debug' for project 'Memory Game'. Then, build the "main.c" and "stm32l4xx_it.c" files in the source folder.

Hardware Requirements

  • NUCLEO-L476RG - STMicroelectronics
  • SG92R Servo Motor

How to Play

  • When the program starts, an LED will light up, indicating that it is the CPUs turn
  • The CPU perform a random 5 sequence pattern which moves the motor arm to different angles accordingly
  • The arm will rotate towards the player, and the LED will turn off, indicating that it is now the User's turn
  • The User will press a button. For each second that the button is held, the LED will blink. Each blink indicates position 1, 2, 3, 4, or 5. It will continue to blink after 5, but these inputs will be disregarded by the game. Depending on how many seconds the button was held, the motor arm will move to the corresponding position
  • The user has 3 tries to match the CPU's pattern
  • In the event of a loss, the motor arm will move slowly taunting the player
  • In the event of a win, the motor arm will perform a quick victory pattern
  • After a win or loss, the game will reset, and the CPU will perform another random sequence

memorygame's People

Contributors

johnnylozano avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.