Go Down

Topic: Serial Communication (Read 289 times) previous topic - next topic

BlackDragon

For a senior project, I am trying to get an Arduino Duemilanove to talk to a Microstrain InertiaLink unit (a 3 axis accelerometer and 3 axis gyroscopes). I have a MAX 232 chip installed to insure the two units talk in TTL language. How can I send a command "0xC2" which is the initiating command to prompt the Microstrain unit to output acceleration and angular rates?

After this is successful, I have the following code for RECEIVING data from the Microstrain written in C code when communicating with a PC which needs transformation to be accepted by the Arduino.

     //acceleration
     pRecord->accelX = FloatFromBytes(&response[1]); //bytes 1..4
     pRecord->accelY = FloatFromBytes(&response[5]); //bytes 5..8
     pRecord->accelZ = FloatFromBytes(&response[9]); //bytes 9..12

     //Angular Rate
     pRecord->angRateX = FloatFromBytes(&response[13]); //bytes 13..16
     pRecord->angRateY = FloatFromBytes(&response[17]); //bytes 17..20
     pRecord->angRateZ = FloatFromBytes(&response[21]); //bytes 21..24


Any help would be greatly appreciated. Thank you

Go Up