How to read in accelerometer data from STEVAL-WeSU1 into MATLAB
Hi, apologies in advance for what is probably a very elementary question. I am a clinical physiologist trying to program this unit to record experiments with patients with movement disorders.
I have got as far as connecting to the device over the BLE protocol using some simple MATLAB commands to connect to the WeSU characteristic + service. This is where I am at:
%%%
device = ble('WeSU')
chr = characteristic(device,"00000000-0001-11E1-9AB4-0002A5D5C51B","00E00000-0001-11E1-AC36-0002A5D5C51B")
X = read(chr);
ACC = typecast(uint8(X([2:3])),'uint16');
%%%
Where
X =[ 192 3 65 0 9 0 237 3 19 0 15 0 156 255 233 255 207 254 241 1]
I know I am trying to convert into native units but I don't understand enough from the datasheet to get me going! Line "ACC..." is my guess at it, but its not working out.
(A) Am I subscribing to the correct characteristic?
(B) How do I properly convert from the raw data format to the native units of the accelerometer/gyroscope?
Any help (or pointers to past discussions) would be hugely appreciated!
Thanks
Tim


