Everytime I had to pull of the blue wire to not damage my xBee, but now I found a solution.
I've added a delay command right before the serial initialization serial.begin() in the setup() session of ardupilot.
Looks like that:
void setup() {
#if GPS_PROTOCOL == 0
delay(3000);
Serial.begin(FIFTY_SEVEN_K_BAUD);
#endif
#if GPS_PROTOCOL == 1
delay(3000);
Serial.begin(FIFTY_SEVEN_K_BAUD);
#endif
#if GPS_PROTOCOL == 2
delay(3000);
Serial.begin(THIRTY_EIGHT_K_BAUD);
#endif
#if GPS_PROTOCOL == 3
delay(3000);
Serial.begin(THIRTY_EIGHT_K_BAUD);
#endif
#if GPS_PROTOCOL == 5
delay(3000);
Serial.begin(THIRTY_EIGHT_K_BAUD);
#endif
init_ardupilot();
}
That causes a 3 seconds delay during the initialization, allowing the modem to startup before sending the serial init.
Cheers,
Leonardo
You need to be a member of diydrones to add comments!
Replies
I have to flash the firmware on the Xbee everytime I run the Ardupilot 2.6.2 and use the Xbee.
That didn't fix the problem, so its on to the code....
The tech at Digi told me it sounds like Xbee is getting the command "ATRW" in the command line some where. He said that would clear it out of the Xbee and cause this problem. I have yet to find it.
Jason
Are you using thermopiles, or IMU?
Nice...this one has caused me a lot of frustration!
JC
Many thanks!