Releases: wollewald/ADXL345_WE
Added comments on the CS pin when using ESP8266 boards
readme update - how to fix SPI problems of some modules
Default SPI clock changed to 5 MHz
I noticed that the limit for the SPI clock is 5 MHz. I had 8 MHz as default and changed this to 5 MHz.
Examples with interrupts more reliable for ESP32
Examples with interrupts are more reliable for the ESP32 now. I added a readAndClearInterrupts() at the end of the setup() function.
2.2.3 did not work on non-ESP32 boards
In the last release I added the function:
_spi->begin(sckPin, misoPin, mosiPin, csPin);
...to enable users to change the SPI pins for ESP32 boards. This causes a compiler error on non-ESP32 boards, eventhough it's not used on these boards. I have now embraced this function by an #ifdef ESP32 clause.
Changing SPI Pins now possible
With this release, you can change the SPI pins, e.g. when using an ESP32. ADXL345_basic_data.ino shows how it works.
Corrected some data type issues
I converted some values wrongly into uint16_t instead of uint8_t. It doesn't change anything effectively, but now it's clean.
Replaced #define by constexpr
Several changes:
- Replaced #define by constexpr
- Tidied the constructors
- Replaced private by protected
- Replaced C-cast by static_cast
Various changes
Various changes:
- got rid of several global variables
- corrected typos
- use of pointers for reading the measured values
- corrected some variable type issues (there was no bug, but not best practice)
Calculation for pitch angle changed
I have changed the calculation of the pitch angle. The new method is more widely used than what I had implemented before. You find more information here, e.g.:
https://wiki.dfrobot.com/How_to_Use_a_Three-Axis_Accelerometer_for_Tilt_Sensing