Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ferasaljoudi/simongame
A simple Simon game with 10 levels designed with C code using Keil uVision
https://github.com/ferasaljoudi/simongame
Last synced: 7 days ago
JSON representation
A simple Simon game with 10 levels designed with C code using Keil uVision
- Host: GitHub
- URL: https://github.com/ferasaljoudi/simongame
- Owner: ferasaljoudi
- License: mit
- Created: 2023-11-14T22:56:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-21T04:38:31.000Z (5 months ago)
- Last Synced: 2024-06-21T22:37:07.447Z (5 months ago)
- Language: C
- Size: 22.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
A simple Simon game designed with 10 levels using C code in Keil uVision, utilizing an STM32F103 Nucleo Board.
This project involves creating a Simon game that challenges the player to replicate sequences of lights generated by the system. The game is designed to run on an STM32F103 Nucleo Board and involves the use of LEDs and push buttons for user interaction. The game progresses through 10 levels of increasing complexity, providing feedback through LEDs for both successful and failed attempts.
| Equipment | To Breadboard | To STM32 |
|:-------------------:|:-----------------:|:------------:|
| 1st pin in btn0 | GND | - |
| 1st pin in btn1 | GND | - |
| 1st pin in btn2 | GND | - |
| 1st pin in btn3 | GND | - |
| 2nd pin in btn0 | 10Kohm Bussed Resistor | PB4 |
| 2nd pin in btn1 | 10Kohm Bussed Resistor | PB6 |
| 2nd pin in btn2 | 10Kohm Bussed Resistor | PB8 |
| 2nd pin in btn3 | 10Kohm Bussed Resistor | PB9 |
| Cathode LED0 | GND | - |
| Cathode LED1 | GND | - |
| Cathode LED2 | GND | - |
| Cathode LED3 | GND | - |
| Cathode LED4 | GND | - |
| Anode LED0 | 270ohm Isolated Resistor | PA0 |
| Anode LED1 | 270ohm Isolated Resistor | PA1 |
| Anode LED2 | 270ohm Isolated Resistor | PA4 |
| Anode LED3 | 270ohm Isolated Resistor | PB0 |
| Anode LED4 | 270ohm Isolated Resistor | PA6 |
1. Initialization:
- When the code runs, the 4 LEDs perform a classic Cylon Eye Scanner sequence.2. Starting the Game:
- The game begins when the player presses the blue button on the STM32.
- The Cylon Eye Scanner stops, and the first round starts by generating a random light sequence.3. Player Interaction:
- The player must mimic the light sequence by pressing the corresponding buttons within a limited time.
- If the player successfully replicates the sequence, a new light is added to the sequence for the next round.
- The game continues this way for up to 10 rounds.4. Failure Condition:
- If the player fails to mimic the pattern correctly, presses the wrong button, or runs out of time, a failure sequence is triggered.
- The separated red LED blinks quickly for 3 seconds to indicate failure.
- The level reached by the player is then displayed in binary using the 4 LEDs.5. Winning Condition:
- If the player successfully completes all 10 rounds, the 4 LEDs blink on and off together in celebration.
Here is a link to a YouTube video demonstrating the game:
- _[Click Here](https://www.youtube.com/watch?v=UqE-Zc_CKJw "Watch a demonstration of the Simon game")_