Releases: sparkfun/SparkFun_KX13X_Arduino_Library
Version 2.0.4
Version 2.0.3
This release:
- Changes the bitfield definitions in regs.h to LSB-first
- Changes the methods in .cpp so they use the bitfields instead of hard-coded bit patterns
- Corrects OR-ing of data into the registers, using the bitfields to set/clear
- Corrects
setRange
( see #19 ) - Improves
getRawAccelData
so it can read 8-bit buffer data as well as 16-bit - Adds
getRawAccelRegisterData
andgetRawAccelBufferData
allowing the data to be read faster if you already know if the buffer is being used and the data resolution
Example fixes
Fixes range argument and adds a small delay after resetting the accelerometer in all examples. The delay aligns with the app note stating that the IC needs 2ms minimum for a proper reset. In some cases faster processors like the Teensy were exposing this lacking delay.
Adds wake/sleep functions
v2.0.1 Adds functions for wake and sleep engines
Library Overhaul
Changes to the library are rather extensive but I will attempt at a concise list below:
-
Separates the library into three distinct file structures: main source files, bus driver source files, and Arduino interface file
-
The data collection was done by value and not by reference which is not....ideal
-
Many additional functions for tap related functionality, and other "engine" functionalities
Overall this allows for easier implementation of additional functions if needed and the performance is much better with the new changes.
Adds SPI example
Adds SPI example
Fixes SPI
ESP32 compatibility fix
As outlined in this issue the KX13X library was not compatible with the ESP32. This is fixed with this release.
Fixes compiler warnings
Correctly passes an argument of the correct size to the requestFrom size parameter.
Bug fixes around reading and writing output data rate
The output data rate was being incorrectly calculated when reading it. When writing to the register, there was an extraneous error check that kept the register from being written correctly.