Close
0%
0%

Arduino gaming console

Connecting the virtual and physical worlds.

Similar projects worth following
Over the past few years we all have been moving into a new platform which is the online platform and slowly the clear distinction between our virtual and physical worlds is fading. Now, more video game studios are investing in augmented and virtual reality to aid this transition between worlds. So, I built this console with the intention of taking my first step into the merging of these 2 vast worlds. The gyro sensor is the highlight of this project which uses physical world data like rotation to calculate the virtual character’s movement.

Basic functioning of this project:

This video game console can run one video game (Diamond Dash) where the player must collect diamonds within the time limit to win. 

More about this project:

The player can control their character using 2 buttons and a gyro sensor. The gyro sensor is used to move the player horizontally while the 2 buttons are used to move the player up and down. I have also used a buzzer to add sound effects to the game. I have used the arduino nano board as it takes up lesser space and hence makes my game console more compact. 

I specifically chose the Nokia 5110 LCD screen for this project because this screen contains back lights. Using a LDR (light dependent resistor) I created an automatic light circuit which alters the light intensity of the back lights based on the surrounding light intensity. When it is in a darker environment, the back lights become brighter while when it is in a brighter environment, the back lights become dimmer. 

Finally, instead of directly soldering all the components onto the perf board I soldered female pin headers and then attached these components to these headers. This not only allows me to reuse these components for other projects but it also protects these components from damage while soldering. I did this for the arduino nano board , Nokia 5110 screen and gyro sensor. 

NokiaGame1.ino

Video Game Code

ino - 4.45 kB - 06/20/2022 at 13:34

Download

  • 2 × tactile push buttons
  • 2 × tactile push button caps
  • 1 × Gyro sensor
  • 1 × Nokia 5110 LCD screen
  • 1 × Arduino nano board

View all 8 components

  • Gyro Sensor

    Xtreme Tech04/14/2022 at 17:00 0 comments

    One of the main components I have used in this project is the MPU6050 gyro sensor. The gyro sensor has brought in a physical aspect to my game which now requires the player to rotate the console sideways in order to move their character horizontally. The player can control the vertical movement using 2 buttons. 

    The gyro sensor has 8 GPIO pins but I have only connected 4 to the arduino nano for this project. The ones I have used are :

     VCC and GND Pins - To provide power to the gyro sensor (gyro sensor requires 3.3V)

     SCL and SDA Pins - For communication

    One of the challenges I faced was figuring out how to measure the angle of rotation using the gyro sensor. Eventually I understood how to measure the angle of rotation and then programmed my game to change the player's x position based on the angle measure by the gyro sensor along the x axis. I have used the MPU6050_light library to measure the angle along the x axis. 

                         Changing the player's position based on the measurements from the gyro sensor


  • Automatic Light Circuit

    Xtreme Tech03/21/2022 at 16:55 0 comments

    I have built a circuit to automatically control the backlights of the Nokia 5110 screen. I had specifically chosen the Nokia 5110 screen because of its unique backlights. The circuit which I have built would control the intensity of the backlights based on the surrounding light intensity. When the surrounding light intensity increases the intensity of the backlights would decrease and vice versa. To build this I have used a light dependent resistor, a normal resistor of small resistance ( for instance of 1K ohms) and some wires. 

    When surrounding light falls on the LDR (light dependent resistor) the resistance of the LDR reduces. Directly connecting the LDR to the backlight pin on the Nokia 5110 will cause the backlights to turn on when there is higher surrounding light intensity. However, I wanted the opposite to happen. So, I built a circuit to reverse the process. 

    This is a parallel circuit in which the current can flow through 2 paths. Current always flows through the path of least resistance. Here one path has the LDR while the other path has a normal resistor (of low resistance). When it is dark (surrounding light intensity is low), the resistance of the LDR will be very high and hence the current will flow through the other path which means it will flow through the normal resistor. This path is connected to the 3.3V power supply. So, in the dark the Nokia 5110 backlights will receive power and hence turn on. However, when it is bright (surrounding light intensity is high), the LDR will have a very low resistance and hence current will flow through the LDR . The LDR is connected to ground. So, in this case the Nokia 5110 backlights will not receive any power and hence will not turn on. Through this manner the intensity of the Nokia 5110 backlight is controlled by the surrounding light intensity.

                                                          Backlights do not turn on when it is bright.


                                                        Backlights turn on when it is dark.

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates