Hi there everyone,
Im just developing the comunication code for my quadcopter, and I need to parse the out of the imu, that is like that:
!!!AN0:-4,AN1:19,AN2:2,AN3:-2,AN4:29,AN5:100,RLL:-0.08,PCH:0.38,YAW:0.04,*
And I though in that code:
#include "mbed.h"
Serial imu(p9, p10);
int an0, an1, an2, an3, an4, an5, rll, pch, yaw = 0;
Serial pc(USBTX, USBRX);
int main() {
imu.baud(38400);
pc.printf("Result of YAW:");
while(true) {
imu.scanf("!!!AN0:.*,AN1:.*,AN2:.*,AN3:.*,AN4:.*,AN5:.*,RLL:.*,PCH:.*,YAW:.*,***", &an0, &an1, &an2, &an3, &an4, &an5, &rll, &pch, &yaw);
pc.putc(yaw);
wait(200);
}
}
And I only receive the "Result of the YAW" in the hyperterminal In my PC.
Any idea about how to solve this? After hours I can't the error to fix at the moment :S
Thank for your attention ;)
Hi there everyone,
Im just developing the comunication code for my quadcopter, and I need to parse the out of the imu, that is like that:
!!!AN0:-4,AN1:19,AN2:2,AN3:-2,AN4:29,AN5:100,RLL:-0.08,PCH:0.38,YAW:0.04,*
And I though in that code:
And I only receive the "Result of the YAW" in the hyperterminal In my PC. Any idea about how to solve this? After hours I can't the error to fix at the moment :S
Thank for your attention ;)