Skip to content

Commit 1e69f4f

Browse files
authored
Merge pull request #5 from rt-net/feature/binary_format
バイナリフォーマットでデータ送信します
2 parents 5a287d4 + 34f77fa commit 1e69f4f

2 files changed

Lines changed: 342 additions & 148 deletions

File tree

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,47 @@ This software is a sample program for the [RT-USB-9axisIMU3](https://www.rt-shop
55

66
The file RT-9DOF-IMU-V3-Quat.ino is forked from the [SparkFun_ICM-20948_ArduinoLibrary examples](https://github.com/sparkfun/SparkFun_ICM-20948_ArduinoLibrary/tree/main/examples).
77

8+
## Data format
9+
Baud rate: 2000000 bps
10+
Transmission frequency: 1 kHz
11+
12+
|Byte | Content | Description |
13+
|-- | -- | -- |
14+
|0 | 0xff | Header |
15+
|1 | 0xff | Header |
16+
|2 | 0x52 | ASCII code "R" |
17+
|3 | 0x54 | ASCII code "T" |
18+
|4 | 0x40 | Lower Bits of Product Identifier |
19+
|5 | 0x41 | Upper Bits of Product Identifier |
20+
|6 | 0x01 | FW version |
21+
|7 | 0x00~0xff | Timestamp - incremented with each data transmission, wraps to 0x00 after 0xff |
22+
|8 | ACC_X_L | ax=(ACC_X_L\|ACC_X_H<<8)/2048*9.8 [m/s] |
23+
|9 | ACC_X_H | |
24+
|10 | ACC_Y_L | |
25+
|11 | ACC_Y_H | |
26+
|12 | ACC_Z_L | |
27+
|13 | ACC_Z_H | |
28+
|14 | GYRO_X_L | gx=(GYRO_X_L\|GYRO_X_H<<8)/(32767/2000)*PI/180 [rad/s] |
29+
|15 | GYRO_X_H | |
30+
|16 | GYRO_Y_L | |
31+
|17 | GYRO_Y_H | |
32+
|18 | GYRO_Z_L | |
33+
|19 | GYRO_Z_H | |
34+
|20 | Q1_1 | Q1 multiplied by (2^30). q1=(Q1_1 \| Q1_2<<8 \| Q1_3<<16 \| Q1_4<<24 )/(2^30) |
35+
|21 | Q1_2 | |
36+
|22 | Q1_3 | |
37+
|23 | Q1_4 | |
38+
|24 | Q2_1 | |
39+
|25 | Q2_2 | |
40+
|26 | Q2_3 | |
41+
|27 | Q2_4 | |
42+
|28 | Q3_1 | |
43+
|29 | Q3_2 | |
44+
|30 | Q3_3 | |
45+
|31 | Q3_4 | |
46+
|32 | Checksum | Lower 8 bits of the sum of all bytes |
47+
48+
849
## Flashing from the Arduino IDE
950

1051
### Setting Up Dependencies

0 commit comments

Comments
 (0)