G is Gyro X,Y ,and Z raw counts. A= Accelerometer X,Y, and Z raw counts.
Note a new version of LSM9DS1.js is attached and the test program AGtest1.js
The LSM9DS1.js goes in the modules subdirectory of your WebIDE project.
The data are read every 200 ms, determined by a set interval.
The ODR and the interval interact. At low ODR fewer samples are in the FIFO in a 200 ms interval.
The FIFO can contain up to 32 samples and can be set to fewer samples if needed.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Code to Read the Gyroscope and Accelerometer Using the FIFO
The Gyroscope ODR (Output Data Rate) Also Controls the Accelerometer ODR if it is On.
By setting it to 0 (Off) the Accelerometer is controlled by
Producing this output:
Changing the gyro ODR to non zero
Produces this output:
Some Notes
G is Gyro X,Y ,and Z raw counts. A= Accelerometer X,Y, and Z raw counts.
Note a new version of LSM9DS1.js is attached and the test program AGtest1.js
The LSM9DS1.js goes in the modules subdirectory of your WebIDE project.
The data are read every 200 ms, determined by a set interval.
The ODR and the interval interact. At low ODR fewer samples are in the FIFO in a 200 ms interval.
The FIFO can contain up to 32 samples and can be set to fewer samples if needed.
2 Attachments