-
Some links:
https://en.wikipedia.org/wiki/I%C2%B2Chttp://johnny-five.io/news/introducing-i2c-component-backpacks/
https://github.com/sparkfun/SparkFun_LSM9DS1_Arduino_Library
The mreadbyte, xgreadbyte, mwritebyte, xgwritebyte, mreadbytes, and xgreadbyte functions using the I2C Wire class in Arduino are defined in the following:
https://github.com/sparkfun/SparkFun_LSM9DS1_Arduino_Library/blob/master/src/SparkFunLSM9DS1.cppLike I said, I know very little about the environment to which you want to port the code.
Got it. So, to use your code as is, I'll need to get Espruino board instead of my Arduino one. Alternatively, I would need to adapt your code to somehow work on my laptop in Node.js environment. I guess something like SerialPort that would transfer raw data that Arduino board gets through I2C interface. And then apply your calculations to result from SerialPort.
I am very new to this and appreciate your help.