r57zone / OpenVR-OpenTrack

OpenVR driver with OpenTrack support / OpenVR драйвер, с поддержкой OpenTrack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DIY Headset using a HDMI screen + arduino with gyroscope

AlexTheTech opened this issue · comments

Hi there,
I was wondering if I was able to make my own headset using your program, the only issues is that i don't know how to use the second screen as VR headset or how to translate the Arduino Gyroscope info to Steam VR, I don't have any code I was wondering if this could be possible.
Cheers!

Hi, yes. You need to buy HDMI 5.5 display, Arduino and GY-85. Some use instead of GY-85 - MPU 6050, this is also possible, you need to draw a conclusion like Razor IMU Sketch.

Firmware for Arduino - Razor IMU
SteamVR driver with support Razor IMU - https://github.com/TrueOpenVR/SteamVR-TrueOpenVR (after install True OpenVR - https://github.com/TrueOpenVR/TrueOpenVR-Core )

Hi, thanks for getting back to me,
Are you sure the Razor software works with an MPU 6050? Because they say to use either 9DOF Razor IMU or 9DOF Sensor Stick, they mention nothing about the GY-85 or MPU 6050.

Cheers!

Yes, I have such a tracker. It is important that the GY 85 magnetometer is one of the list - https://github.com/Razor-AHRS/razor-9dof-ahrs/blob/master/Arduino/Razor_AHRS/Razor_AHRS.ino#L160 for the RazorIMU firmware to be compatible (magnetometer calibration).

For MPU 6050 will have to search for firmware, but it is also compatible. The driver "RazorIMUStr" reads the string format "#YPR=-103.49,2.74,4.74", and the driver "RazorIMUBin" reads the binary format of the 3 float number.

RazorIMUStr:

Serial.print("#YPR=");
Serial.print(TO_DEG(yaw)); Serial.print(",");
Serial.print(TO_DEG(pitch)); Serial.print(",");
Serial.print(TO_DEG(roll)); Serial.println();

RazorIMUBin:

float ypr[3];  
ypr[0] = TO_DEG(yaw);
ypr[1] = TO_DEG(pitch);
ypr[2] = TO_DEG(roll);
Serial.write((byte*) ypr, 12);

I'm not sure if you need an expensive GY 85 today, maybe a fairly cheap MPU 6050.

Firmware for MPU6050 https://github.com/terminal29/Arduino-Tracker-Plugin/tree/master/Arduino_Tracker_Sketch or http://www.geekmomprojects.com/gyroscopes-and-accelerometers-on-a-chip/ needs further work, need to remove the quatraion for first firmware and make the output of YPR, either binary or string like Razor IMU.

Sorry, I'm clueless when it comes to code, so I just have to remove the // in front of line 160?
What do I do with this code?

RazorIMUStr:

Serial.print("#YPR=");
Serial.print(TO_DEG(yaw)); Serial.print(",");
Serial.print(TO_DEG(pitch)); Serial.print(",");
Serial.print(TO_DEG(roll)); Serial.println();
RazorIMUBin:

float ypr[3];
ypr[0] = TO_DEG(yaw);
ypr[1] = TO_DEG(pitch);
ypr[2] = TO_DEG(roll);
Serial.write((byte*) ypr, 12);

Cheers!

This code is needed if you have to do your make firmware for the MPU 6050.

I understand that, but where do I put it? Do I add it to Razor_AHRS.ino or where do I put it in?

In Razor AHRS you do not need to add anything, but it is supported as is. It needs to be downloaded to Arduino, configured and calibrated.

OHHHH ok makes sense now thankyou i will see if it works 👍