1.0.0 • Published 8 years ago
adxl345-bytes-to-vector v1.0.0
adxl345-bytes-to-vector
Converts the adxl345 bytes to a 3d vector
Input
X LSB
X MSB
Y LSB Y MSB
Z LSB Z MSB
Output X int Y int Z int
var adxl345Bytes2Vec = require("adxl345-bytes-to-vector");
var rawBytes = [0x31,0x00,0x23,0x00,0x31,0xff];
var vector = adxl345Bytes2Vec(rawBytes);
//vector = [ 49, 35, -207 ]
1.0.0
8 years ago