Releases: wollewald/ADXL345_WE
Updated function list, SPI management for Arduino UNO R4
Correct way of handling xyzFloat and several other changes
- Handling of xyzFloat strucure changed
- All example sketches are modified accordingly
- Two additional example sketches for using two ADXL345 modules via SPI
- Code shortened
Improved SPI connection check
I have improved SPI connection check. When connecting several devices the return value of the init() function was misleading if one of the devices was not connected correctly.
Added comments on the CS pin when using ESP8266 boards
If you use an ESP8266, the standard CS Pin (e.g. D8/GPIO15 on a WEMOS D1 mini or NodeMCU) might not work. I added comments in readme and the SPI example sketch.
No change of code!
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.