#imu #byte #protocols #data #hiwonder

bin+lib hiwonder

Interface for interacting with Hiwonder IMUs

8 releases

new 0.3.2 Apr 18, 2025
0.3.1 Apr 17, 2025
0.2.3 Jan 31, 2025
0.1.0 Jan 1, 2025

#985 in Hardware support

Download history 130/week @ 2024-12-28 32/week @ 2025-01-04 183/week @ 2025-01-11 200/week @ 2025-01-18 145/week @ 2025-01-25 110/week @ 2025-02-01 105/week @ 2025-02-08 18/week @ 2025-02-15 4/week @ 2025-02-22 3/week @ 2025-03-01 2/week @ 2025-03-08 95/week @ 2025-04-05 142/week @ 2025-04-12

237 downloads per month
Used in 2 crates (via imu)

MIT license

23KB
504 lines

Link to IMU:

HiWonder IMU Protocol

  • Data Length: 11 bytes
  • Header/start/SOF Byte: 0x55
  • Command Byte: 0x51 accel data, 0x52 Gyroscope data, 0x53 angle data, 0x59 quaternion data
  • Data: 8 bytes
  • CheckSum Byte: 1 byte (only lowest 8 bits of summation of all bytes in packet is used (CheckSum & 0xff))

Setup

  • Install this driver for the CH341 USB controller
  • This should create a /dev/ttyUSB0 - you should check which one by doing ls /dev/tty*. You might need to the change the permissions
  • Connect the IMU to the computer via USB
  • Default Baud Rate: 9600
  • Default USB port: /dev/ttyUSB0

Notes

While the datasheet says that the temperature is included in both the accelerometer and magnetometer data packets, we have observed that the temperature is only included in the accelerometer data packet and the magnetometer data packet is padded with zeroes.

Dependencies

~2MB
~43K SLoC