DIY VR HEADSET FOR $80 : 10 Steps (with Pictures)

DIY VR HEADSET FOR $80 : 10 Steps (with Pictures)

Just note that the orientation of the MPU 6050 makes a difference to which of the axis of the gyroscope will be used. For the above code the MPU 6050 was mounted on the side of the headset as shown in the pictures.

In the event of the MPU 6050 being mounted with a different orientation, you might have to substitute between the gx, gy and gz values until the desired configuration is achieved.

For my configuration, I am rotating around the Y and Z axis.

Also the numbers associated with calculation of vx and vy might have to be tweaked to get the results (movement speed etc.) you desire.

I also added a push button, that when pressed temporarily disables the gyroscopic mouse movement. This is useful when you want to reset you point of view in games.