Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 8 months ago.
Unable ot receive data from my IMU ( 3DM-GX1)
Hi everyone,
To use my IMU, i need to send an instruction so it can send back the data I need, but i get nothing back, and i don't know what i'm doing wrong. Any help is welcome
I'm using this code :
- include "mbed.h"
- include "Serial.h"
- include <stdio.h>
Serial imu (p9,p10); Serial pc(USBTX, USBRX);
char data[11]; int i;
int main() {
pc.baud(9600); imu.baud(38400); imu.format(8,Serial::None,1);
while(1) {
imu.putc(0x0E); pc.printf("IMU est interrogé \n" );
while(!(imu.readable()));
for (i=0;i<10;i++){ data[i]=imu.getc(); }
pc.printf("La lecteur des donnés \n" );
for (i=0;i<11;i++){ pc.printf(" %d \n",data[i]); }
wait(2); } }
Looks like that part is EOL if this is the same one. Probably not the best to use if you have any choice in the component selection process. http://www.microstrain.com/inertial/3DM-GX1
posted by Sam Grove 24 Feb 2015