Pages: [1]   Go Down
Author Topic: Serial Communication  (Read 261 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: