Arduino Leonardo is an old board but the only compatible board for this project. It has the required SCL and SDA pin for connection of MPU6050.
Connections: Connect the 5V and GND to breadboard.2. Joystick:
Use: We use the joystick as a keyboard. While playing a game,we use it move the character in front or back or sideways,etc.
Connections: Connect the GND and 5V in the same line as that of Leonardo as shown in the schematics. Connect the VRX to A1 (Analog Pin 1) and VRY to A0 of Leonardo.3. MPU6050:
Use: The MPU6050 is a 6 DOF (Degrees of Freedom) or a six axis IMU sensor, which means that it gives six values as output. Three values from the accelerometer and three from the gyroscope. It is basically used as a mouse.
Connections: Connect the GND and VCC in the railing as in schematics. Connect the SCL and SDA to SCL and SDA of Leonardo.4. Button:
Use: Used as a fire button while playing any game.
Connections: Connect the button pin to Digital Pin 1 and other to GND.
Connect everything according to the schematics. Upload the code to Leonardo and watch the fun!
Note: To switch on the joystick, press it down once.