Decode start accelerometer
All,
I'm trying to connect the MetaWearC accelerometer to my pycom. I can make connection with the MetaWearC and get the gyroscoop data described here:
https://www.cumulations.com/blogs/66/decoding-metawear-apis-using-ble-to-read-gyro-sensor
Does anyone has decoded how to get the accelerometer data, I tried those raw data sequence, but it didn't work for me:
https://mbientlab.com/community/discussion/1543/ble-accelerometer-bytes
Thanks !
This discussion has been closed.
Comments
Refer to the unit tests for byte level commands.
https://github.com/mbientlab/MetaWear-SDK-CSharp/blob/master/MetaWear.Test/AccelerometerTest.cs
MbientLab typically does not support using non-official SDKs so I'd recommend using the unit testing framework to generate the values to write to the device rather than attempt to reverse engineer the communication protocol.
Thx, tried some of the commands over there, how do I read out the data ?
I don't receive a Notify on the corresponding service.
The gyro works (MetaWearC) if I send:
char.write(b'\x13\x03\x26\x00') #13032600
char.write(b'\x13\x03\x26\x04') #13032604
char.write(b'\x13\x05\x01') #130501
char.write(b'\x13\x02\x01\x00') #13020100
char.write(b'\x13\x01\x01') #13020100
Did you try the commands from the thread you had previously linked?
https://mbientlab.com/community/discussion/comment/2085/#Comment_2085
As I previously said, use one of the existing SDKs to program the board how you want, then log the bytes that are written to the device.