What a wonderful week. The idea of this week was why not make a game like the one we are receiving in this diploma. The game was about a fish running to miss the barriers that meet it
We designed the circuit on Tinkercad
We have used several tools in this project as a
tool component:
-Screwdriver -Iron pliers - Soldering iron -ruler -scalpel -Rotring compass
-wax gun -scissors
Tool to use prototype:
-cardboard
electronic component:
-ON/OFF Switch -DC Power Adapter -DC Jack to terminal block converter
-Jumper Wires (Male-Female) -Crocodile Wires
Tool Component
Arduino
resistor
adapter power
buzzer
on/of switch
LCD I2C
wire male or female
Tool to use prototype.
LCD
Buzzer module
resistor
Arduino
Push Bottom
The first step after preparing the tools used is to connect the LCD as we can see
GND with GND pin arduino
VCC with 5v pin arduino
SDA with A4 pin arduino
SCL with A5 pin arduino
After that, we connect the buzzer
responsible for the sound that
indicates the jump or loss, as we see
The positive party Ali pin3 Arduino
The negative GND pin Arduino
Then we connect Pushbottom
The positive party Ali pin2 Arduino
The negative GND pin Arduino
We connected the on / off switch so that when you press it, we turn on the game, and when vice versa, we turn off the game, but with a code from Arduino
The first step after preparing the tools used is to connect the LCD as we can see
GND with GND pin arduino
VCC with 5v pin arduino
SDA with A4 pin arduino
SCL with A5 pin arduino
After that, we connect the buzzer responsible for the sound that indicates the jump or loss, as we see
The positive party Ali pin3 Arduino
The negative GND pin Arduino
Then we connect Pushbottom
The positive party Ali pin2 Arduino
The negative GND pin Arduino
Here we have two buttons, one of which is for the game so that the saliva jumps, and the other is the ON / OFF switch in order to turn the game on and off
In this part of the code, the libraries that will be worked on are identified and called, and each pin number is defined with a name so that it is easy to deal with and the word “buzzer” is used instead of the PIN number example :
#define PIN_BUTTON 2
#define PIN_AUTOPLAY 1
#define PIN_Buzzer 3
#define PIN_READWRITE 10
#define PIN_CONTRAST 12
In this part of the code, the LCD is defined and each graphic is defined as the illumination of the particular pixel in the specified row with the specified column.
// Run position 1 expamle
B01100,
B01100,
B00000,
B01110,
b11100,
B01100,
B11010,
B10011,
Here we define each PIN case, is it OUTPUT or INPUT
And we turn on the LCD and turn on the backlight of the screen
In this part we operate the buzzer with the jump in every jump it makes by pressing the button
In this part, we run the buzzer with a longer period than the jump press, because it indicates that you lose the role you are playing.
The problem we are facing:
And it was that the elements on the screen were quickly appearing and disappearing like blinking, so it was uncomfortable for the person playing the game
Solve the problem:
And when looking for a solution
I found that the microcontroller deals with moments, that is, it executes the thing at a speed that the eye cannot see, so the DELAY was invented so that we can see the changes that occur. I discovered that the problem with DELAY () was very little, so imagine that the waiting time for a certain shape to appear in front of you is small, it will disappear quickly , and this will make you feel the blood of comfort during the game and when the time increases it becomes more comfortable
Title of Media
Title of Media
Title of Media
Title of Media