Problems using AHRS IMU: no hardware connected to port?
-
- One Eyed Hopeful
- Posts: 38
- Joined: Thu Sep 04, 2014 6:40 am
Problems using AHRS IMU: no hardware connected to port?
Hi,
I am having problems with AHRS IMU.
I'm trying to run the head-tracking part of this project:
http://mclightning.com/openvr-2-software/diy/
So I upload this code to my Arduino with no errors:
https://github.com/ayildirim/OpenVR/blo ... o_code.ino
Then i can see at the monitor serial values, changing very fast, like this:
#YPR=-65.61,-2.67,16.80
Arduino is at COM 10 and baud rate 57600.
I open FreePIE (1.5.475) and load this code (i'm interested in TrackIR code):
https://github.com/ayildirim/OpenVR/blo ... %20GY85.py
Then i go to Settings>Plugins>AHRS IMU and set Com port to "10" and Baud rate to "57600"
I think i'm doing it well, but when I run the script... I always have the same error:
"No hardware connected to port COM10 with AHRS IMU protocol"
I googled for some help, but I only found references to check the number of COM port.
Please, can anyone help me?
Regards!
I am having problems with AHRS IMU.
I'm trying to run the head-tracking part of this project:
http://mclightning.com/openvr-2-software/diy/
So I upload this code to my Arduino with no errors:
https://github.com/ayildirim/OpenVR/blo ... o_code.ino
Then i can see at the monitor serial values, changing very fast, like this:
#YPR=-65.61,-2.67,16.80
Arduino is at COM 10 and baud rate 57600.
I open FreePIE (1.5.475) and load this code (i'm interested in TrackIR code):
https://github.com/ayildirim/OpenVR/blo ... %20GY85.py
Then i go to Settings>Plugins>AHRS IMU and set Com port to "10" and Baud rate to "57600"
I think i'm doing it well, but when I run the script... I always have the same error:
"No hardware connected to port COM10 with AHRS IMU protocol"
I googled for some help, but I only found references to check the number of COM port.
Please, can anyone help me?
Regards!
-
- One Eyed Hopeful
- Posts: 38
- Joined: Thu Sep 04, 2014 6:40 am
Re: Problems using AHRS IMU: no hardware connected to port?
Please, take a minute to read my thoughts about it:
(sorry for my English...)
Looking at AhrsImuPlugin.cs code, I can see some serial commands launched:
And the last of them is:
Then the code wait for a response in a determinated format:
And if the time is overcome, throws the error i'm getting.
In the Arduino side, i see the answer to the SYNCH request is:
So I can´t see what is wrong with it.
I need help.
(sorry for my English...)
Looking at AhrsImuPlugin.cs code, I can see some serial commands launched:
Code: Select all
serialPort.Write("#ob"); // Turn on binary output
serialPort.Write("#o1"); // Turn on continuous streaming output
serialPort.Write("#oe0"); // Disable error message output
Code: Select all
serialPort.Write("#s00"); //Request sync signal
Code: Select all
while (serialPort.BytesToRead < "#SYNCH00\r\n".Length)
{
if (stopwatch.ElapsedMilliseconds > 100)
throw new Exception(string.Format("No hardware connected to port {0} with AHRS IMU protocol", port));
}
In the Arduino side, i see the answer to the SYNCH request is:
Code: Select all
// Reply with synch message
Serial.print("#SYNCH");
Serial.write(id, 2);
Serial.println();
I need help.
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Problems using AHRS IMU: no hardware connected to port?
Code: Select all
#YPR=-65.61,-2.67,16.80
Code: Select all
#ob
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Problems using AHRS IMU: no hardware connected to port?
One thing you can do if you dont get your firmware to respond to the commands is to change the code here
https://github.com/ayildirim/OpenVR/blo ... ut.ino#L14
and make it output the Free_IMU text format
https://github.com/ayildirim/OpenVR/blo ... ut.ino#L14
and make it output the Free_IMU text format
Code: Select all
Serial.print(TO_DEG(yaw));
Serial.print(",");
Serial.print(TO_DEG(pitch));
Serial.print(",");
Serial.print(TO_DEG(roll));
Serial.println("");
-
- One Eyed Hopeful
- Posts: 38
- Joined: Thu Sep 04, 2014 6:40 am
Re: Problems using AHRS IMU: no hardware connected to port?
I get the values in text mode (monitor serial #YPR=-65.61,-2.67,16.80) before run the freepie script.
Then i close the monitor serial and run the freepie script.
After run freepie script (and get the error) if i open the monitor serial i can see binary values.
So the commands was ejecuted.
Then i close the monitor serial and run the freepie script.
After run freepie script (and get the error) if i open the monitor serial i can see binary values.
So the commands was ejecuted.
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Problems using AHRS IMU: no hardware connected to port?
The code was written against a Sparkfun razor with firware v1.4.0 installed, shouldnt matter but to rule it out, please try version v1.4.0 on your board
-
- One Eyed Hopeful
- Posts: 38
- Joined: Thu Sep 04, 2014 6:40 am
Re: Problems using AHRS IMU: no hardware connected to port?
I don't understand.
Please, explain it a little more
Please, explain it a little more
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Problems using AHRS IMU: no hardware connected to port?
I just tried it with 1.4.0 which works, there is no reason why 1.4.2 shouldn't work, but please try.
-
- One Eyed Hopeful
- Posts: 38
- Joined: Thu Sep 04, 2014 6:40 am
Re: Problems using AHRS IMU: no hardware connected to port?
I'm afraid it still doesn't work.
And i don't know what to do
And i don't know what to do
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Problems using AHRS IMU: no hardware connected to port?
I cant reproduce your problem so its hard to try, I will upgrade my AHRS to latest version when I get time and see if its the version thats causing it.
-
- One Eyed Hopeful
- Posts: 38
- Joined: Thu Sep 04, 2014 6:40 am
Re: Problems using AHRS IMU: no hardware connected to port?
Cybervillain, i'm using an Arduino Leonardo (pro micro) with GY-85 MPU
When you talk about AHRS firmware, what do you mean exactly? To the arduino esketch used or anything else?
When you talk about AHRS firmware, what do you mean exactly? To the arduino esketch used or anything else?
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Problems using AHRS IMU: no hardware connected to port?
Firmware is a bad word, sorry,the software loaded onto the board. I didnt have time to load the latest AHRS software during the weekend sorry. I'm still on 1.4.0 on my board, and it works
-
- One Eyed Hopeful
- Posts: 38
- Joined: Thu Sep 04, 2014 6:40 am
Re: Problems using AHRS IMU: no hardware connected to port?
Oh! I see.
I would load 1.4.0 on mine and try with my mods (to work with gy85)
Please, where can i find that version?
I only find the last version
Or can you share your code, please?
I would load 1.4.0 on mine and try with my mods (to work with gy85)
Please, where can i find that version?
I only find the last version
Or can you share your code, please?
-
- One Eyed Hopeful
- Posts: 38
- Joined: Thu Sep 04, 2014 6:40 am
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden