Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1993 | - | 1 | #include <ADXL345.h> |
2 | #include <bma180.h> |
||
3 | #include <HMC58X3.h> |
||
4 | #include <ITG3200.h> |
||
5 | |||
6 | //#define DEBUG |
||
7 | #include "DebugUtils.h" |
||
8 | |||
9 | |||
10 | #include "FreeIMU.h" |
||
11 | #include <Wire.h> |
||
12 | |||
13 | int raw_values[9]; |
||
14 | char str[512]; |
||
15 | float val[9]; |
||
16 | |||
17 | |||
18 | // Set the default object |
||
19 | FreeIMU my3IMU = FreeIMU(); |
||
20 | |||
21 | void setup() { |
||
22 | Serial.begin(115200); |
||
23 | Wire.begin(); |
||
24 | |||
25 | delay(500); |
||
26 | my3IMU.init(true); // the parameter enable or disable fast mode |
||
27 | delay(500); |
||
28 | } |
||
29 | |||
30 | void loop() { |
||
31 | my3IMU.getRawValues(raw_values); |
||
32 | sprintf(str, "%d,%d,%d,%d,%d,%d,%d,%d,%d,", raw_values[0], raw_values[1], raw_values[2], raw_values[3], raw_values[4], raw_values[5], raw_values[6], raw_values[7], raw_values[8]); |
||
33 | Serial.print(str); |
||
34 | Serial.print(10, BYTE); |
||
35 | |||
36 | /* |
||
37 | my3IMU.getValues(val); |
||
38 | sprintf(str, "%d,%d,%d,%d,%d,%d,%d,%d,%d", int(val[0]), int(val[1]), int(val[2]), int(val[3]), int(val[4]), int(val[5]), int(val[6]), int(val[7]), int(val[8])); |
||
39 | Serial.print(str); |
||
40 | Serial.print(10, BYTE); |
||
41 | */ |
||
42 | } |
||
43 |