Hi all,

After spending more than 2 days trying to get my EM406A work with my ArduIMU (v1) in binary a finally gave up.

I reset it all as an NMEA gps at 38400 baud and made sure I had a working GPS that got a fix using a terminal prograjm. 

I ran the IMU in debug and got the following output with the GPS by my window.

!!!VER:1.8.1,RLL:-0.06,PCH:-0.05,YAW:5.70,IMUH:253,LAT:546332616,LON:-35521700,ALT:405,COG:78,SOG:0,FIX:1,SAT:6,TOW:20424300***

I then turned debug off and set for binary output. Taking the IMU outside it then acquired 8 sats (using the killmore test program), 

Unfortunately the little blue LED will not stop flashing.

Does anyone know why the IMU recognises the data but will not recognise a fix?

Any help would be great.

Many thanks.

Tags: Arduimu, EM406A

Views: 276

Reply to This

Replies to This Discussion

bump, same problem here

Look in the arduino.pde program for the place that controls the flashing of the blue light for the GPS. You will find two case statements and a default statement. The two case statements are backwards case 2 is first. I changed this to only turn on the light if gps.fix is true. You don't have to do this but I did it anyway. The second case statement causes the light to flash with no lock. Comment out everything from the default statement to the break statement, and your blue led will work correctly. It will flash when there is no lock and go solid when there is one. Not at a computer now so I can't give you line numbers.

arduino.pde or arduimu.pde :)
i will try, thanks

mmm... did u mean this code ;

// GPS Fix indication
                                switch (GPS.status()) {
                                        case(2):
                          digitalWrite(BLUE_LED_PIN,HIGH);  //Turn Blue LED when gps is fixed.
                                              break;
                                              
                                        case(1):
                                              if (GPS.valid_read == true){
                                                    toggleMode = abs(toggleMode-1); // Toggle blue light on and off to indicate NMEA sentences exist, but no GPS fix lock
                                                    if (toggleMode==0){
                                                          digitalWrite(BLUE_LED_PIN, LOW); // Blue light off
                                                    } else {
                                                          digitalWrite(BLUE_LED_PIN, HIGH); // Blue light on
                                                    }
                                                    GPS.valid_read = false;
                                              }
                                              break;
                                              
                                        default:
                                              digitalWrite(BLUE_LED_PIN,LOW);
                                              break;
                }

Yes, that's it. Here's what mine looks like now.

                            // GPS Fix indication

                                switch (GPS.status())

                                {

                                        case(2):

                                                 if (GPS.fix = 1)

                                                {

                                                  digitalWrite(BLUE_LED_PIN,HIGH);  //Turn Blue LED on when gps is fixed.

                                                }

                                                  else

                                                  {

                                                    digitalWrite(BLUE_LED_PIN,LOW);  //Turn Blue LED off when gps is not fixed.

                                                  }

                                                 

                                                  break;

                                             

                                        case(1):

                                              if (GPS.valid_read == true)

                                              {

                                                    toggleMode = abs(toggleMode-1); // Toggle blue light on and off to indicate NMEA sentences exist, but no GPS fix lock

                                                    if (toggleMode==0)

                                                    {

                                                          digitalWrite(BLUE_LED_PIN, LOW); // Blue light off

                                                    }

                                                      else

                                                      {

                                                          digitalWrite(BLUE_LED_PIN, HIGH); // Blue light on

                                                      }

                                                GPS.valid_read = false;

                                              }

                                              break;

                                             

                                      /*  default:

                                              digitalWrite(BLUE_LED_PIN,LOW);

                                              break; */

                                                                }

                                                                break;

                                                                

Charles

charles i love u :) . wow great, working good...
very much thank charles...

nice... :)

After looking at this a bit more I think you can achieve the same thing by making a minor change to GPS.cpp. 

Here it is:

#include "GPS.h"
#include "WProgram.h"

int
GPS::status(void)
{
if (millis() - _lastTime >= 500){
return 0;
} else if (fix == 0) {
return 1;
} else {
return 2;
}
}

void
GPS::_setTime(void)
{
_lastTime = millis();
}

In here if the update time is greater then 500 millis it will return a zero and this will cause the switch to call the default statement. One of the problems with the EM406 is that it is slow. If you change the the compare from 500 to 1000 it would probably work without changing the arduimu program. If this works it would be a much better fix than my first example.

Done, Solved, i change to 1000 :) , and first code back to begin
charles thank you very much,

oops, yes arduimu. :)

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service