SlideShare a Scribd company logo
Electromania:
The Tetris
An ECDC Event
By Team Electrofinder
Table of Contents:
– Introduction
– Acknowledgement
– Construction
– Hardware
– Algorithm
– Device
– Features
Introduction
Team ElectroFinder
Members:
•Supriya Gorai(17605)
•Samik Das(17606)
•Shubham Kumar(17500)
College of Engineering and Management, Kolaghat, West Bengal
Acknowledgement
We, team ElectroFinder, are greatly thankful for providing us the opportunity to present
our project in front of such a great platform “Electromania” in your annual techfest
“Techkriti 18”.
Construction
the body
We used Acrolic sheets in building the device body. It is transparent so that internal
components can be easily seen. The device is given a shape of a box which is quite
handy in structure and can be opened from the backside. Nut-bolts, zip-ties and glue
are used to make the box more rigid.
Hardware
Components used to make the circuit
1. Arduino Nano
2. MAX 7219 Dot Led
Matrix Module 3. 3.7V Lithium Battery Cgarging
Module TP4056 with
Overcharge Protection
4. LM2596 DC-DC Buck
Converter adjustable Step up
Module Power Supply 5. Micro Switches
6. 3.7V Li-on Battery
Hardware
circuit explanation
We are using a charging
module in connection
with a 3.7V li-on battery.
The output of the
charging module is put
on a buck converter for
powering the Arduino
Nano and provide
required power to the
led matrix. The led
matrix is in conjugation
with IC MAX7219
forming a compact
module. We are using
Arduino Nano
microcontroller for the
model.
Hardware
led matrix module
Algorithm
Important Variable Declarations
1. All shapes and possible patterns.
2. Corresponding shapes and patterns required for rotation.
3. Delay times to control speed and threshold scores for different levels.
4. Required messages and numbers to display score.
5. Declare required pins for I/O interactions.
Consider each shape as 5X8 array
Yellow: Original Pattern
Red: Blocks involving during rotation
Corresponding array
fig - 1 for normal shape
fig - 2 for rotation
Array for letters to be displayed in message
Algorithm
void setup()
1. Setting shutdown mode for MAX 7219 module.
2. Setting LED matrix intensity.
3. Setting the pins to input mode.
4. Define and initialize all global variables.
5. We consider mainly two arrays to hold the current display pattern of the LED and the current
shape with column position.
• Current area
• Temporary area
Combination of these two arrays is used to decide the next pattern to be displayed
Note: Point No. 1, 2, 3 are the settings for the LED Matrix Module
Algorithm
The Game
1. For first time run, display the message “NEW GAME” + “LEVEL 0” and set flag to indicate
game has started.
2. Check if all blocks of a row is set to high, if yes then remove the row and update score.
3. If the score crossed threshold the next level the upgrade level , clear display, show new
level.
4. Select a random block with random position.
5. Move the block downwards till last row or other blocks present in the current pattern is
reached . While moving downwards need to check the status of the input switches and
take necessary actions –
• Reset: set the start game flag and return to main loop to restart the game. Go
to step 1.
• Right shift: Check if shift is possible.
Not crossing last column.
Not overlapping with existing patter.
If move is possible then display otherwise next action.
Algorithm
The Game Contd...
• Left shift: Check if shift is possible.
Not crossing first column.
Not overlapping with existing patter.
If move is possible then display otherwise next action.
•Rotation: Check if rotation is possible.
Consider the corresponding rotation pattern.
Shift the pattern to the position of current shape.
Check if this pattern is overlapping with current pattern.
If rotation is possible then select the next shape/pattern from the
shape array and display otherwise next action.
• Pause/Play: Run a loop till the switch is pressed again.
• Speed: Set the delay to lower value to increase the speed, if the switch is
released set the delay to previous value.
Algorithm
The Game Contd...
6. If no more downward move is possible for the current shape.
If the whole shape is not displayed then the Game is Over.
Else need to select next pattern and position. Go to step 2.
7. If the Game is Over then display message “GAME OVER” + “SCORE” + <current score>
8. Repeat display in step 7 until RESET switch is pressed.
Algorithm
in practical
Down
+
Rotate
Down
+
Left Shift
Down
+
Right Shift
Down
+
Pause
Device
Front View
Back View
Back View(Box Opened)
Features
• It is handy to carry.
• It has 5 hours of backup.
• Charge the battery using any micro USB type charger.
• Easy to replace damaged position.
Thank you.

More Related Content

Similar to Electromania updated

Hurdle Race Game
Hurdle Race GameHurdle Race Game
Hurdle Race Game
Asawal
 
08 neural networks
08 neural networks08 neural networks
08 neural networks
ankit_ppt
 
Simulation Testing for Cosserat Rods
Simulation Testing for Cosserat RodsSimulation Testing for Cosserat Rods
Simulation Testing for Cosserat Rods
Zhan Wang
 
The1
The1The1
Report - Line Following Robot
Report - Line Following RobotReport - Line Following Robot
Report - Line Following Robot
Divay Khatri
 
Shoot-for-A-Star
Shoot-for-A-StarShoot-for-A-Star
Shoot-for-A-Star
Dmitry Kazakov
 
AUTOCAD RAHUL
AUTOCAD  RAHULAUTOCAD  RAHUL
AUTOCAD RAHUL
RahulKumar5178
 
CAD/CAM/CAE - Notes
CAD/CAM/CAE - NotesCAD/CAM/CAE - Notes
CAD/CAM/CAE - Notes
Learn With GeekAlign
 
Design of a 3R robotic manipulator to operate in sapce
Design of a 3R robotic manipulator to operate in sapceDesign of a 3R robotic manipulator to operate in sapce
Design of a 3R robotic manipulator to operate in sapce
Aniket Shirsat
 
© Dmitriy ShironosovShutterStock, Inc.LABORATORYLogic C.docx
© Dmitriy ShironosovShutterStock, Inc.LABORATORYLogic C.docx© Dmitriy ShironosovShutterStock, Inc.LABORATORYLogic C.docx
© Dmitriy ShironosovShutterStock, Inc.LABORATORYLogic C.docx
gerardkortney
 
Omp 220 complete class omp220
Omp 220 complete class omp220Omp 220 complete class omp220
Omp 220 complete class omp220
arnitaetsitty
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms I
Mohamed Loey
 
Productivity Tips For Altium Designer
Productivity Tips For Altium DesignerProductivity Tips For Altium Designer
Productivity Tips For Altium Designer
Schattke
 
Basic Tutorial for Robotic Arm
Basic Tutorial for Robotic ArmBasic Tutorial for Robotic Arm
Basic Tutorial for Robotic Arm
Yu Wei Chen
 
Complexity of algorithms
Complexity of algorithmsComplexity of algorithms
Complexity of algorithms
Jasur Ahmadov
 
Oct27
Oct27Oct27
Oct27
Tak Lee
 
Altium productivity
Altium productivityAltium productivity
Altium productivity
Alex Borisov
 
Dueling network architectures for deep reinforcement learning
Dueling network architectures for deep reinforcement learningDueling network architectures for deep reinforcement learning
Dueling network architectures for deep reinforcement learning
Taehoon Kim
 
Catch or die Project
Catch or die ProjectCatch or die Project
Catch or die Project
Mustafa Kamel
 
k10790 nilesh prajapati control me 6th sem
k10790 nilesh prajapati control me 6th semk10790 nilesh prajapati control me 6th sem
k10790 nilesh prajapati control me 6th sem
harshprajapati12
 

Similar to Electromania updated (20)

Hurdle Race Game
Hurdle Race GameHurdle Race Game
Hurdle Race Game
 
08 neural networks
08 neural networks08 neural networks
08 neural networks
 
Simulation Testing for Cosserat Rods
Simulation Testing for Cosserat RodsSimulation Testing for Cosserat Rods
Simulation Testing for Cosserat Rods
 
The1
The1The1
The1
 
Report - Line Following Robot
Report - Line Following RobotReport - Line Following Robot
Report - Line Following Robot
 
Shoot-for-A-Star
Shoot-for-A-StarShoot-for-A-Star
Shoot-for-A-Star
 
AUTOCAD RAHUL
AUTOCAD  RAHULAUTOCAD  RAHUL
AUTOCAD RAHUL
 
CAD/CAM/CAE - Notes
CAD/CAM/CAE - NotesCAD/CAM/CAE - Notes
CAD/CAM/CAE - Notes
 
Design of a 3R robotic manipulator to operate in sapce
Design of a 3R robotic manipulator to operate in sapceDesign of a 3R robotic manipulator to operate in sapce
Design of a 3R robotic manipulator to operate in sapce
 
© Dmitriy ShironosovShutterStock, Inc.LABORATORYLogic C.docx
© Dmitriy ShironosovShutterStock, Inc.LABORATORYLogic C.docx© Dmitriy ShironosovShutterStock, Inc.LABORATORYLogic C.docx
© Dmitriy ShironosovShutterStock, Inc.LABORATORYLogic C.docx
 
Omp 220 complete class omp220
Omp 220 complete class omp220Omp 220 complete class omp220
Omp 220 complete class omp220
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms I
 
Productivity Tips For Altium Designer
Productivity Tips For Altium DesignerProductivity Tips For Altium Designer
Productivity Tips For Altium Designer
 
Basic Tutorial for Robotic Arm
Basic Tutorial for Robotic ArmBasic Tutorial for Robotic Arm
Basic Tutorial for Robotic Arm
 
Complexity of algorithms
Complexity of algorithmsComplexity of algorithms
Complexity of algorithms
 
Oct27
Oct27Oct27
Oct27
 
Altium productivity
Altium productivityAltium productivity
Altium productivity
 
Dueling network architectures for deep reinforcement learning
Dueling network architectures for deep reinforcement learningDueling network architectures for deep reinforcement learning
Dueling network architectures for deep reinforcement learning
 
Catch or die Project
Catch or die ProjectCatch or die Project
Catch or die Project
 
k10790 nilesh prajapati control me 6th sem
k10790 nilesh prajapati control me 6th semk10790 nilesh prajapati control me 6th sem
k10790 nilesh prajapati control me 6th sem
 

Recently uploaded

一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
eydeofo
 
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
xuqdabu
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
u0g33km
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
xuqdabu
 
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
nudduv
 
Production.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd ddddddddddddddddddddddddddddddddddProduction.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd dddddddddddddddddddddddddddddddddd
DanielOliver74
 
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
nvoyobt
 
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
xuqdabu
 
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
byfazef
 
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
yizxn4sx
 
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginnersSOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SethiLilu
 
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
yizxn4sx
 
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
yizxn4sx
 
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
6oo02s6l
 
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
uwoso
 
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
ei8c4cba
 
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
8db3cz8x
 
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
terpt4iu
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
terpt4iu
 
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
1jtj7yul
 

Recently uploaded (20)

一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
 
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
 
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
 
Production.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd ddddddddddddddddddddddddddddddddddProduction.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd dddddddddddddddddddddddddddddddddd
 
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
 
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
 
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
 
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
 
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginnersSOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
 
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
 
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
 
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
 
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
 
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
 
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
 
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
 
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
 

Electromania updated

  • 1. Electromania: The Tetris An ECDC Event By Team Electrofinder
  • 2. Table of Contents: – Introduction – Acknowledgement – Construction – Hardware – Algorithm – Device – Features
  • 3. Introduction Team ElectroFinder Members: •Supriya Gorai(17605) •Samik Das(17606) •Shubham Kumar(17500) College of Engineering and Management, Kolaghat, West Bengal
  • 4. Acknowledgement We, team ElectroFinder, are greatly thankful for providing us the opportunity to present our project in front of such a great platform “Electromania” in your annual techfest “Techkriti 18”.
  • 5. Construction the body We used Acrolic sheets in building the device body. It is transparent so that internal components can be easily seen. The device is given a shape of a box which is quite handy in structure and can be opened from the backside. Nut-bolts, zip-ties and glue are used to make the box more rigid.
  • 6. Hardware Components used to make the circuit 1. Arduino Nano 2. MAX 7219 Dot Led Matrix Module 3. 3.7V Lithium Battery Cgarging Module TP4056 with Overcharge Protection 4. LM2596 DC-DC Buck Converter adjustable Step up Module Power Supply 5. Micro Switches 6. 3.7V Li-on Battery
  • 7. Hardware circuit explanation We are using a charging module in connection with a 3.7V li-on battery. The output of the charging module is put on a buck converter for powering the Arduino Nano and provide required power to the led matrix. The led matrix is in conjugation with IC MAX7219 forming a compact module. We are using Arduino Nano microcontroller for the model.
  • 9. Algorithm Important Variable Declarations 1. All shapes and possible patterns. 2. Corresponding shapes and patterns required for rotation. 3. Delay times to control speed and threshold scores for different levels. 4. Required messages and numbers to display score. 5. Declare required pins for I/O interactions. Consider each shape as 5X8 array Yellow: Original Pattern Red: Blocks involving during rotation Corresponding array fig - 1 for normal shape fig - 2 for rotation Array for letters to be displayed in message
  • 10. Algorithm void setup() 1. Setting shutdown mode for MAX 7219 module. 2. Setting LED matrix intensity. 3. Setting the pins to input mode. 4. Define and initialize all global variables. 5. We consider mainly two arrays to hold the current display pattern of the LED and the current shape with column position. • Current area • Temporary area Combination of these two arrays is used to decide the next pattern to be displayed Note: Point No. 1, 2, 3 are the settings for the LED Matrix Module
  • 11. Algorithm The Game 1. For first time run, display the message “NEW GAME” + “LEVEL 0” and set flag to indicate game has started. 2. Check if all blocks of a row is set to high, if yes then remove the row and update score. 3. If the score crossed threshold the next level the upgrade level , clear display, show new level. 4. Select a random block with random position. 5. Move the block downwards till last row or other blocks present in the current pattern is reached . While moving downwards need to check the status of the input switches and take necessary actions – • Reset: set the start game flag and return to main loop to restart the game. Go to step 1. • Right shift: Check if shift is possible. Not crossing last column. Not overlapping with existing patter. If move is possible then display otherwise next action.
  • 12. Algorithm The Game Contd... • Left shift: Check if shift is possible. Not crossing first column. Not overlapping with existing patter. If move is possible then display otherwise next action. •Rotation: Check if rotation is possible. Consider the corresponding rotation pattern. Shift the pattern to the position of current shape. Check if this pattern is overlapping with current pattern. If rotation is possible then select the next shape/pattern from the shape array and display otherwise next action. • Pause/Play: Run a loop till the switch is pressed again. • Speed: Set the delay to lower value to increase the speed, if the switch is released set the delay to previous value.
  • 13. Algorithm The Game Contd... 6. If no more downward move is possible for the current shape. If the whole shape is not displayed then the Game is Over. Else need to select next pattern and position. Go to step 2. 7. If the Game is Over then display message “GAME OVER” + “SCORE” + <current score> 8. Repeat display in step 7 until RESET switch is pressed.
  • 16. Features • It is handy to carry. • It has 5 hours of backup. • Charge the battery using any micro USB type charger. • Easy to replace damaged position.