Skip to content

Notify 9 Axis IMU data from M5Stack-Grey with BLE

License

Notifications You must be signed in to change notification settings

S-YOU/GrayBlue

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GrayBlue

This is M5Stack Gray firmware to notify 9DOF motion sensor(MPU-9250) data by Bluetooth Low Enagy.

Therefore .

Demo

Applied the notified quaternion to the virtual object with Unity.

Description

IMU

MPU-9250 provide these data.

  • acceleration (xyz) [mg]
  • gyro (xyz) [deg/s]
  • magnetic force (xyz) [mG]
  • quaternion (wxyz) []

Quaternion is calculated from acc and gyro by DMP of MPU-9250. These 13(3+3+3+4) data are notified by BLE.

Front 3 buttons

Press or release 3 buttons on front is also notified by BLE.

BLE

Above data are notified by BLE Gatt.

9-DOF data profile

  • Service UUID: c87ace96-3523-11e9-b210-d663bd873d93
  • Characteristics
    • UUID: c87ad148-3523-11e9-b210-d663bd873d93
    • type: 52 byte binary array. (13 float value)
    • format:
      • accX [0:3]
      • accY [4:7]
      • accZ [8:11]
      • gyroX [12:15]
      • gyroY [16:19]
      • gyroZ [20:23]
      • magX [24:27]
      • magY [28:31]
      • magZ [32:35]
      • quatW [36:39]
      • quatX [40:43]
      • quatY [44:47]
      • quatZ [48:51]

Button event profile

  • Service UUID: de4c3b20-26ea-11e9-ab14-d663bd873d93
  • Characteristics
    • UUID: de4c4016-26ea-11e9-ab14-d663bd873d93
    • type: 4 byte value
    • format:
      • isPressed [0] (pressed=1/release=0)
      • buttonType [1] (left='A'/center='B'/right='C')
      • pressTime [2:3] (milliSeconds. On button press, value=0.)

Install

This project use PlatformIO.

If you try to build and write to your M5Stack Gray, you need to install PlatformIO environment on your PC.

Library

Licence

MIT

Author

@naninunenoy

About

Notify 9 Axis IMU data from M5Stack-Grey with BLE

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 79.3%
  • C++ 20.7%