Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
15 views
4th - Sem - Project File
Project file on a game based on Arduino
Uploaded by
Chandramouli Haldar
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save 4th_sem_Project File For Later
Download
Save
Save 4th_sem_Project File For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
15 views
4th - Sem - Project File
Project file on a game based on Arduino
Uploaded by
Chandramouli Haldar
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save 4th_sem_Project File For Later
Carousel Previous
Carousel Next
Save
Save 4th_sem_Project File For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 17
Search
Fullscreen
Simon Says Game Using Arduino UN Thesis Submitted in fulfilment of the Requirement for the degree of Bachelor of Technology (B.Tech) in Department of Computer Science and Engineering By CHANDRAMOULI HALDAR (212) NITISH KUMBHAKAR (213) ELEEN DAS (214) SAMALI GHOSH (215) ARIJIT MITRA (216) LIZA SINHA (217) Under the guidance of Prof. MS. Nilanjana Adhikari GNiT Guru Nanak Institute of Technology, Kolkata-700110ACKNOWLEDGEMENTS We would like to express our special thanks of gratitude to our Mentor for this project "MS. Nilanjana Adhikari" Madam for their able guidance and support in completing our Project. Her insightful advice and timely feedback significantly contributed to the project's success. Under her mentorship, we gained not only technical knowledge but also a sense of confidence and resilience in overcoming challenges. Thank you, MS. Nilanjana Adhikari madam, for your unwavering support and for being an exceptional mentor throughout our project. Date: name Place:GURUNANAK INSTITUTE OF TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CERTIFICATE ‘This is to certify that the thesis entitled, “Simon Says Game Using Arduino UNO’ being submitted by CHANDRAMOULI HALDAR (212), NITISH KUMBHAKAR (213), ELEN DAS@214), SAMALI GHOSH (215), ARISIT MITRA (216), LIZA SINHA (217) for the award of the degree of Bachelor of Technology (Computer Science and Engineering) of GNIT, is a record of bonafide research work carried out by his under supervision and guidance. They have worked for nearly ‘one month on the above problem at the Department of Computer Science and Engineering, Gorunanak Institute of Technology, Kolkata and this has reached the standard fulfilling the requirements and the regulation relating to the degree. ‘The contents of this thesis, in full or part, have not been submitted to any other university or institution for the award of any degree or diploma, MS. Nilanjana Adhikari Department of Computer Science and Engineering GNIT, Kolkata. Head of the Department Department of | Gees GNIT, Kolkata’ “neat sceContents Chapter No. Contents Page No. 1. Abstract ol 2. — Introduction ol 3. Objective 02 4. Proposed System 02 5. System Model 03 5.1 Hardware Requirement 5.2 Software Requirement 5.3 Design 6. Code Explanation 05 7. Experimental Results 8. ConclusionAbstract This project involves the creation of a Simon Says game using the Arduino Uno platform, designed to combine nostalgic entertainment with modern technology. Simon Says is a beloved memory game that challenges players to remember and reproduce sequences of tones and lights, enhancing both cognitive skils and reflexes. The game features four LEDs representing different colours, which light up in a sequence that the player must replicate using corresponding push buttons for input. An OLED display provides real-time feedback by showing the player's current score, making the game more engaging. To add an auditory element, a buzzer produces sounds corresponding to the LED sequences, aiding in the ‘memory challenge. Additionally, the game stores high scores in the EEPROM, allowing it to keep track of, players’ best performances even after the device is powered off. The objective of this project isto replicate the classic Simon Says game in a modern, interactive format suitable for both educational and recreational purposes, making it an excellent tool for learning about electronics, programming, and memory enhancement Introduction Simon Says is a classic children’s game enjoyed by many for its simplicity and challenge. ‘Traditionally, one player assumes the role of "Simon" and issues instructions to the other players, such as "jump in the air” or "stick out your tongue.” These commands must be followed only if preceded by the phrase "Simon says." Players who mistakenly follow commands without the phrase or fail to follow those with it are eliminated. The game tests players’ ability to discer genuine commands from fake ones rather than their physical abilities. The goal for Simon is to eliminate all players as quickly as possible, with the last remaining player typically declared the winner. However, if the final players are eliminated simultaneously, Simon wins. ‘The game has permeated popular culture, referenced in films, music, and literature. A notable electronic adaptation of Simon Says was invented by Ralph H. Baer and Howard J. Morrison and released by Milton Bradley in 1978. This electronic version challenges players to reproduce a series of signals in the correct order, enhancing memory ski Our project aims to recreate this iconic game using an Arduino Uno, leveraging its capabilities for handling input, output, and storage. By utilizing LEDs, push buttons, an OLED display, and a buzzer, we replicate the game's original functionality. The LEDs and push buttons represent different colours, the buzzer provides auditory feedback, and the OLED display shows the player's current score and highest score achieved. This project not only brings the classic game into a ‘modern, interactive format but also serves as an excellent demonstration of how simple electronic ‘components can be combined to create an engaging and educational interactive system,Objective The objective of this project is to create an engaging and interactive version of the classic Simon Says game using the Arduino Uno platform. Our primary goal is to provide a fun and effective way to practice and enhance memory skills. By replicating the original game’s mechanics through the use of LEDs, push buttons, an OLED display, and a buzzer, we aim to create an educational tool that challenges players to remember and reproduce sequences of tones and lights. This process not only sharpens memory but also improves cognitive abilities and reflexes. The inclusion of high score tracking via EEPROM further motivates players to improve their performance over time. Ultimately, this project serves both recreational and educational purposes, demonstrating how simple electronic components can be integrated to create a valuable learning and entertainment experience. Proposed System The proposed system for the Simon Says game using the Arduino Uno platform aims to faithfully recreate the classic game’s engaging and challenging mechanics while leveraging modern electronic components to enhance the user experience. The system is designed to be intuitive and user-friendly, making it accessible for players of all ages. System Components 1. Arduino Uno: © The central microcontroller unit (MCU) responsible for handling all inputs, outputs, and game logi 2. LEDs: Four LEDs, each representing a different color (red, green, blue, and yellow), will be used to generate the sequences that players must replicate. 3. Push Buttons: © Four push buttons corresponding to each LED will allow players to input their responses to the sequences. 4. OLED Display: © An OLED display will provide real-time feedback to the players, showing the current score, high scores, and game instructions. 5s. Buzzer: oA buzzer will produce distinct tones corresponding to each LED, adding an auditory element to the game and aiding in sequence memorization. 6. EEPROM: © The EEPROM on the Arduino Uno will be used to store high scores, ensuring that players’ best performances are saved even when the system is powered off.System Operation 1. Init ization: © When the system is powered on, the Arduino Uno initializes all components, displaying a welcome message and instructions on the OLED display. 2. Game Start: © The game begins with the Arduino generating a random sequence of LEDs lighting up, accompanied by corresponding tones from the buzzer. 3. Player Input: ‘© Players must replicate the sequence by pressing the corresponding push buttons. The system checks each input for correctness. 4. Feedback and Scoring: After each input, the OLED display updates the player’s score. If the player correctly replicates the sequence, the game progresses with an additional step added to the sequence. If the player makes a mistake, the game ends, and the final score is displayed 5. High Score Tracking: ‘© The system compares the current score with the high scores stored in the EEPROM. Ifa new high score is is saved and displayed on the OLED. 6. Reset and Replay: © Players have the option to reset the game and start a new round, making it easy to replay and continuously improve their memory skills. System Model Hardware Requirement Arduino Uno: The central microcontroller that controls all the components OLED Display (128x32): Used to display the current score and high scores, LEDs: Four LEDs (Yellow, Blue, Green, Red) to represent the different colours. Push Buttons: Four push buttons corresponding to the LEDs. Buzzer: Provides audio feedback. Resistors: Used for current limiting with LEDs and pullup configuration for buttons Veroboard and Jumper Wires: For constructing the circuit sdaveepe Software Requirement 1, Arduino IDE: For writing and uploading the code to the Arduino Uno. 2. Adafruit GFX Library: A graphics library for handling the OLED display. 3. Adafruit SSD1306 Library: A library specifically for controlling the SSD1306 OLED display.4. EEPROM Library: For reading from and writing to the Ardui 5. Pitches Library: For defining musical notes for the buzzer. EEPROM. <5O@ uno Design Circuit Diagram ‘The circuit for this project involves connecting the LEDs, push buttons, OLED display, and buzzer to the Arduino Uno. The specific connections are as follows: 1) LEDs: a) Yellow: Pin7 b) Blue: Pin 6 c) Green: Pin 4 d) Red: Pin 5 2). Push Buttons: a) Yellow: Pin 8 b) Blue: Pin 9 c) Green: Pin 11 d) Red: Pin 10 3) Buzzer: Pin 12 4) OLED Display: a) SDA: Adb) SCL: AS Code Explanation The code for this project consists of several key components: Libraries and Constants include
include
include
include
include "pitches.h" const uint8_t yellowLed = 7, blueLed = 6, greenLed = 4, redLed = const uint8_t yellowBtn = 8, blueBtn = 9, greenBtn = 11, redBtn = 10; const uint8_t buttonTones[] = {NOTE_G3, NOTE_C4, NOTE_E4, NOTE_GS}; const uint8_t width = 128, height = 32, oledAddress = 0X3C; const int8_t oledReset = 1; const uint8_t buzzerPin = 12, maxGameLength = 100, highScoreAddress = 0; Setup Function The “setup” function initializes the game by configuring pins, setting up the OLED display, and displaying the initial messages. void setup() { Serial.begin(115200); pinMode(buzzerPin, OUTPUT); for (uint8_ti = 0; i < sizeof(ledPins); i++) { pinMode(ledPins[i], OUTPUT); pinMode(buttonPins[i], INPUT_PULLUP); J Wire.begin0; oled.begin(SSD1306_SWITCHCAPVCC, oledAddress); oled.clearDisplay(); oled.setTextColor WHITE);randomSeed(analogRead(A0)): welcomeMessage(): showCurrentRecord(): delay(2000); showScore(gamelndex); Main Loop The “loop” function runs continuously, generating a new sequence step, playing the sequence, and checking the player's input. void loop() { gameSequence{gamelndex++] = random(0, 4); if (gameIndex >= maxGameLength) { gameIndex = maxGameLength 1: } autoPlaySequence(); if (!checkUserValidSequence()) { gameOver(); i delay(300); showScore(gamelndex); if (gamelndex > 0) { playLevelUpSound(); delay(300); : yi Helper Functions Various helper functions handle different aspects of the game: Welcome Message: Displays the welcome message on the OLED display. void welcomeMessage() { oled.setCursor(0, 0);oled.setTextSize(2); oled.print("Welcome To"); oled.setCursor(0, 16); oled.print(""Simon Game"); oled.display(); delay(1500 oled.clearDisplay(); oled.display(); Sequence Playback: Plays the current sequence using LEDs and sounds. void autoPlaySequence() { for (uint8_t i = 0; i < gamelndex; i++) { uint8_t currentLed = gameSequence[i]; illuminateLedAndPlaySound(currentLed); delay(70); } } LED and Sound Control: Controls the LEDs and buzzer. void illuminateLedAndPlaySound(uint8_t ledIndex) { digitalWrite(ledPins[ledIndex}, HIGH): tone(buzzerPin, buttonTones[ledIndex]); delay(300); digitalWrite(ledPins[ledIndex], LOW): noTone(buzzerPin); User Sequence Validation: Checks if the user input matches the sequence. bool checkUserValidSequence() { for (uint8_t i = 0; i < gamelndex; i++) { uint8_t expectedButton = gameSequence[i]; uint8_t actualButton = readGameButtons();illuminateLedAndPlaySound(actualButton); if (expectedButton != actualButton) return false: i return true; } Button Reading: Reads the input from the buttons. uint8_t readGameButtons() { while (true) { for (uint8_t i = 0; i < 4; i++) { uint8_t buttonPin = buttonPins[i]; if (digitalRead(buttonPin) == LOW) return i; J delay(5); i } Game Over Handling: Manages the game over state and updates the high score. void gameOver() { uint8_t gameScore = gameIndex 1; Serial. printIn("Game over!"); Serial.printIn("obtained score: " + (String)gameScore + "\n"); gamelndex = 0; if (gameScore > readHighScore()) newRecordAchievement(gameScore); else showScore(gameScore); delay(350); playGameOverSound(); for (uint8_t i =0; i < 10; i++) { for (int pitch = 10; pitch <= 10; pitch++) {tone(buzzerPin, NOTE_CS + pitch); delay(5); } i noTone(buzzerPin); delay(500); oled.clearDisplay(); oled.display(); Level Up Sound: Plays a sound when the player advances to the next level. void playLevelUpSound() { tone(buzzerPin, NOTE_E4): delay(150); tone(buzzerPin, NOTE_G4); delay(150); tone(buzzerPin, NOTE_ES): delay(150); tone(buzzerPin, NOTE_C5); delay(150); tone(buzzerPin, NOTE_DS); delay(150); tone(buzzerPin, NOTE_GS); delay(150); noTone(buzzerPin); Game Over Sound: Plays a sound when the game is over. void playGameOverSound() { tone(buzzerPin, NOTE_DSS): delay(300); tone(buzzerPin, NOTE_D5); delay(300); tone(buzzerPin, NOTE_CSS5);delay(300); } High Score Management: Reads, writes, and displays high scores. void newRecordAchievement(byte newScore) { writeHighScore(newScore); showNewRecord(); } void showScore(byte score) { oled.clearDisplay(); oled.setCursor(0, 8); oled.setTextSize(2); oled.print(" Score: " + (String)score); oled.display(); } void showRecord(String msg) { oled.clearDisplay(); oled.setTextSize(1); oled.setCursor(0, 0); oled.print(msg); oled.setTextSize(2); oled.setCursor(0, 12); String s = (String)readHighScore(; oled.print(”" +s); oled.display(); } void showCurrentRecord() { showRecord(" Current Record: } void showNewRecord() { showRecord(" New Record!");} uint8_t readHighScore() { return EEPROM.read(highScoreAddress); } void writeHighScore(byte score) { EEPROM.write(highScoreAddress, score); } void resetHighScore() { EEPROM.write(highScoreAddress, 0);Conclusion This project successfully replicates the classic Simon Says game using the Arduino Uno platform. The integration of LEDs, push buttons, an OLED display, and a buzzer provides an interactive and engaging user experience. The use of EEPROM for high score stutage adus a competitive element to the game. Future enhancements could include additional game modes, sound effects, and a more sophisticated user interface. Also we can see the simulation on this link : hittps://wokwi.com/projects/399327212499607553
You might also like
ARDUINO JUNIOR Learn Arduino For Kids Can Be Fun
PDF
No ratings yet
ARDUINO JUNIOR Learn Arduino For Kids Can Be Fun
91 pages
Final Project Portfolio Cpre 281
PDF
No ratings yet
Final Project Portfolio Cpre 281
23 pages
EIGHT Electronic Games AdCal Instructions Nov21 - 230925 - 190245
PDF
No ratings yet
EIGHT Electronic Games AdCal Instructions Nov21 - 230925 - 190245
28 pages
8×8 LED Matrix MAX7219 With Scrolling Text & Android Control Via Bluetooth
PDF
No ratings yet
8×8 LED Matrix MAX7219 With Scrolling Text & Android Control Via Bluetooth
15 pages
'Mission Impossible' Bomb Arduino
PDF
No ratings yet
'Mission Impossible' Bomb Arduino
3 pages
Memory Game Report by Using Arduino
PDF
No ratings yet
Memory Game Report by Using Arduino
12 pages
Arduino-Based Handheld Simon Game - Arduino-Based-Handheld-Simon-Game
PDF
No ratings yet
Arduino-Based Handheld Simon Game - Arduino-Based-Handheld-Simon-Game
63 pages
Ext 34752
PDF
No ratings yet
Ext 34752
4 pages
MPMC Project
PDF
No ratings yet
MPMC Project
31 pages
Final Report
PDF
No ratings yet
Final Report
5 pages
Final Report
PDF
No ratings yet
Final Report
5 pages
Tic Tac Toe Report
PDF
No ratings yet
Tic Tac Toe Report
2 pages
Arduino LED Memory Game - ICCCE-2021
PDF
No ratings yet
Arduino LED Memory Game - ICCCE-2021
2 pages
Reaction Game
PDF
No ratings yet
Reaction Game
1 page
Digital Dice Game Using 8051 Microcontroller: Mini Project On
PDF
No ratings yet
Digital Dice Game Using 8051 Microcontroller: Mini Project On
51 pages
Deopujari Arjun Technical Report
PDF
No ratings yet
Deopujari Arjun Technical Report
41 pages
Picstack Report
PDF
No ratings yet
Picstack Report
21 pages
TTT Report
PDF
No ratings yet
TTT Report
15 pages
Implementation of A Digital Dice Game
PDF
No ratings yet
Implementation of A Digital Dice Game
4 pages
Mini Cover Page
PDF
No ratings yet
Mini Cover Page
8 pages
Application of Computer Architecture and Organisation Using DE2 Board
PDF
No ratings yet
Application of Computer Architecture and Organisation Using DE2 Board
4 pages
1 D Pong: Ece-316 Microprocessor Lab Project
PDF
No ratings yet
1 D Pong: Ece-316 Microprocessor Lab Project
20 pages
Matching Balls: Abstract - The Next Document Is A Report of The Final Project
PDF
No ratings yet
Matching Balls: Abstract - The Next Document Is A Report of The Final Project
3 pages
Mini Project
PDF
No ratings yet
Mini Project
33 pages
Flappy Bird Game Full Report PDF
PDF
50% (2)
Flappy Bird Game Full Report PDF
26 pages
Digital Dice Using At89C51: A Report Submitt Ed To MSRIT Bangalore, For Partial Requirement of Award of Degree of
PDF
No ratings yet
Digital Dice Using At89C51: A Report Submitt Ed To MSRIT Bangalore, For Partial Requirement of Award of Degree of
21 pages
B Ricoooooo or Eaker
PDF
No ratings yet
B Ricoooooo or Eaker
6 pages
Catch or Die
PDF
No ratings yet
Catch or Die
13 pages
Wireless Based Led Dot Matrix Message Di
PDF
No ratings yet
Wireless Based Led Dot Matrix Message Di
7 pages
Arduino Uno. Project
PDF
No ratings yet
Arduino Uno. Project
19 pages
Assignmnent Isanka
PDF
No ratings yet
Assignmnent Isanka
46 pages
IJRPR3312
PDF
No ratings yet
IJRPR3312
11 pages
Distance Measurement System Project Report - Amit Bar
PDF
100% (1)
Distance Measurement System Project Report - Amit Bar
32 pages
Reaction Timer Game Circuit
PDF
No ratings yet
Reaction Timer Game Circuit
5 pages
Arduino Book
PDF
No ratings yet
Arduino Book
22 pages
Tic Tac Toe
PDF
100% (5)
Tic Tac Toe
3 pages
Modul 1 Introduction To Arduino
PDF
No ratings yet
Modul 1 Introduction To Arduino
17 pages
Micro Controller
PDF
No ratings yet
Micro Controller
47 pages
IOT_7_8_final
PDF
No ratings yet
IOT_7_8_final
10 pages
Wireless Morse Code Receiver and Transmitter Using Arduino
PDF
No ratings yet
Wireless Morse Code Receiver and Transmitter Using Arduino
16 pages
CSE369 Lab8 Wi22
PDF
No ratings yet
CSE369 Lab8 Wi22
6 pages
Led Dice
PDF
No ratings yet
Led Dice
10 pages
Design Led Matrix
PDF
100% (1)
Design Led Matrix
7 pages
Arduino
PDF
No ratings yet
Arduino
28 pages
The Platfrom
PDF
No ratings yet
The Platfrom
19 pages
Project Report
PDF
No ratings yet
Project Report
5 pages
DLD Project
PDF
No ratings yet
DLD Project
4 pages
Indian Institute of Technology Kharagpur
PDF
No ratings yet
Indian Institute of Technology Kharagpur
14 pages
Fpga Based Vga Driver and Arcade Game
PDF
0% (1)
Fpga Based Vga Driver and Arcade Game
37 pages
VHDL Based Circuits Design and Synthesis On FPGA: A Dice Game Example For Education
PDF
No ratings yet
VHDL Based Circuits Design and Synthesis On FPGA: A Dice Game Example For Education
6 pages
Lab 8 - Option 2 - The Simon Game
PDF
14% (7)
Lab 8 - Option 2 - The Simon Game
6 pages
ESD Assignment
PDF
No ratings yet
ESD Assignment
14 pages
CPE400 Lab4
PDF
No ratings yet
CPE400 Lab4
16 pages
Glick Wish Man
PDF
No ratings yet
Glick Wish Man
22 pages
FIS - Lab Insem Question Paper
PDF
No ratings yet
FIS - Lab Insem Question Paper
2 pages
Sum A B Cin Cout A B + A Cin + B Cin: Figure 4.1 Truth Table
PDF
No ratings yet
Sum A B Cin Cout A B + A Cin + B Cin: Figure 4.1 Truth Table
6 pages
Ep-1.4 21mca2001
PDF
No ratings yet
Ep-1.4 21mca2001
9 pages
JETIR2305625
PDF
No ratings yet
JETIR2305625
8 pages
Metro Train Prototype Based On 8051 Microcontroller: A B.Tech. Project Report ON
PDF
No ratings yet
Metro Train Prototype Based On 8051 Microcontroller: A B.Tech. Project Report ON
15 pages