Comrades in Arms Discussion Board

Full Version: Arduino/GY-85 headtracker
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
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/0B1fDI89...hhWkE/view

Any help appreciated
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.
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.
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
I assume the VCC pin is the one I connect on the GY-85, not the 3.3V pin ?
(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
(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...
(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/
No, this one: https://github.com/chrisfranson/open-headtracker

As I said, the problem is I can't send anything.
(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...1-blinkies
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
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.
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
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.
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
Pages: 1 2 3