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.
Permalink Reply by charles1317 on April 6, 2012 at 10:32pm
Permalink Reply by Ajienux on April 6, 2012 at 11:00pm arduino.pde or arduimu.pde :)
i will try, thanks
Permalink Reply by Ajienux on April 7, 2012 at 12:37am 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;
}
Permalink Reply by charles1317 on April 7, 2012 at 8:37am 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
Permalink Reply by Ajienux on April 7, 2012 at 8:46am charles i love u :) . wow great, working good...
very much thank charles...
nice... :)
Permalink Reply by charles1317 on April 7, 2012 at 9:30am 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.
Permalink Reply by Ajienux on April 7, 2012 at 11:00pm Done, Solved, i change to 1000 :) , and first code back to begin
charles thank you very much,
Permalink Reply by charles1317 on April 7, 2012 at 8:20am oops, yes arduimu. :)
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.185 members
6 members
129 members
87 members
24 members
© 2013 Created by Chris Anderson.
Powered by
