Comrades in Arms Discussion Board
Arduino/GY-85 headtracker - Printable Version

+- Comrades in Arms Discussion Board (http://forum.ciahome.net)
+-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3)
+--- Forum: Technical Support (http://forum.ciahome.net/forumdisplay.php?fid=12)
+--- Thread: Arduino/GY-85 headtracker (/showthread.php?tid=2997)

Pages: 1 2 3


Arduino/GY-85 headtracker - Varanon - 05-13-2015

I've got the hardware, built it, but I can't get the sketch to compile... I kept it running for about 3 hours, and it still didn'T finish compiling.

This is the sketch: https://drive.google.com/file/d/0B1fDI89phEESTDAyb3k1X2hhWkE/view

Any help appreciated


Re: Arduino/GY-85 headtracker - Varanon - 05-14-2015

Update: I installed a previous version of the Arduino software, and now it compiles.. had to fix a few errors, though.

However, I get no reaction at all from the board. Investigating.


Re: Arduino/GY-85 headtracker - doveman - 05-14-2015

Are you just testing with the cable or using BT? You should be able to get data to show in the serial monitor if you edit the appropriate lines to print (or is it serial.print). Have you flashed the calibration sketch? I guess you should still get data even if you haven't calibrated yet but I recall it was gibberish for me until I did that.

I get a red light on the Pro micro and a green one on the GY-85 when it's powered, so if you don't see the latter it might be worth checking your wiring. It might be that it won't come on if there's a problem with the sketch though, if it signals a data connection between the two boards.


Re: Arduino/GY-85 headtracker - Varanon - 05-14-2015

I do get a red light on the Pro Micro, but nothing on the GY-85.  I didn#t even know it has a led.. I'll check if the power is connected


Re: Arduino/GY-85 headtracker - Varanon - 05-14-2015

I assume the VCC pin is the one I connect on the GY-85, not the 3.3V pin ?


Re: Arduino/GY-85 headtracker - Varanon - 05-14-2015

(05-14-2015, 12:47 AM)doveman link Wrote:Are you just testing with the cable or using BT? You should be able to get data to show in the serial monitor if you edit the appropriate lines to print (or is it serial.print). Have you flashed the calibration sketch? I guess you should still get data even if you haven't calibrated yet but I recall it was gibberish for me until I did that.

Problem is, I get a total hangup of the Arduino IDE when I try to send anything... receiving works, I can add debug output etc.

Unfortunately, the sensor data seems to be nonsense. As I said, I don't get any LED on the GY-85


Re: Arduino/GY-85 headtracker - Varanon - 05-14-2015

(05-14-2015, 01:02 AM)Varanon link Wrote:I do get a red light on the Pro Micro, but nothing on the GY-85.  I didn#t even know it has a led.. I'll check if the power is connected

Ok, update, I get the green led now on the GY-85. I've unsoldered the HC-05 for now.

I still get the hangup when I try to send something, though...


Re: Arduino/GY-85 headtracker - doveman - 05-14-2015

(05-14-2015, 01:14 AM)Varanon link Wrote:Ok, update, I get the green led now on the GY-85. I've unsoldered the HC-05 for now.

I still get the hangup when I try to send something, though...


Cool, you're getting somewhere Smile Which sketch are you using, is it the FTR v0.2 download that has a Calibration and Facetrack folder?


This one https://sourceforge.net/projects/gy80facetrack/files/


Re: Arduino/GY-85 headtracker - Varanon - 05-14-2015

No, this one: https://github.com/chrisfranson/open-headtracker

As I said, the problem is I can't send anything.


Re: Arduino/GY-85 headtracker - doveman - 05-14-2015

(05-14-2015, 01:30 AM)Varanon link Wrote:No, this one: https://github.com/chrisfranson/open-headtracker

As I said, the problem is I can't send anything.


Hmm, if you mean you can't upload the sketch to the Pro Micro, maybe you need a different driver? I can't recall if I had to install one separately but in my Arduino-1.0.5-r2 folder I see there's a Drivers folder with a couple of things in and I think I used that. Then make sure you select Leonardo as the board and select the right serial/COM port.


Then try a basic test sketch like this to make sure it's working first:
https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/example-1-blinkies


Re: Arduino/GY-85 headtracker - Varanon - 05-14-2015

I can upload sketches, so I assume the serial usb works. I also tried some of the examples like the string manipulation.  Everythimg works, butmit hangs as soon as I want to send to the board


Re: Arduino/GY-85 headtracker - doveman - 05-14-2015

You could try testing with a different terminal emulator like teraterm to see if that let's you send commands without it hanging. I recall having some issues with the serial monitor myself.


Re: Arduino/GY-85 headtracker - Varanon - 05-14-2015

At least the terminal program doesn't crash (I used teraterm), but still no reaction.

I find it peculiar, since I have the same behavior with both Arduino boards I have here. Must be PC software side, I guess. I had trouble getting the serial driver to install


Re: Arduino/GY-85 headtracker - doveman - 05-14-2015

Does sound like there's something wrong on the PC side. I just plugged my other Arduino in and Device Manager shows under Ports "Arduino Leonardo (COM3)" and the details show a date of 04/01/2013 and the file is \Windows\system32\Drivers\usbser.sys


I had to disable my BT driver (COM6) in Device Manager, otherwise I couldn't even upload any sketches (it said couldn't open COM4, so obviously that was confusing it and making it try to upload to the wrong port, even though I had COM3 selected in IDE).


I uploaded the Blinking LED sketch, which worked and showed Hello World in the Serial Monitor. Then I uploaded this sketch, which repeats back anything I type in the serial monitor.


Code:
void setup(){
   Serial.begin(9600); // Init Virtual Serial Port - Machine
}


void loop(){
  if (Serial.available() > 0) {
     char myData = Serial.read();
     Serial.println(myData);
}}


So see if you can get that working to start with.


Re: Arduino/GY-85 headtracker - Varanon - 05-15-2015

Interesting, thanks.

I tried the echo sketch, and indeed, it still crashes the Arduino serial monitor, but works with TeraTerm. Weird shit.

At least I know now that the problems are not the hardware. Will try to get some response from the GY-85 next