adafruit / Adafruit_LIS3DH

Arduino Library for Adafruit LIS3DH breakout board
Other
72 stars 57 forks source link

Add isAlive() to check LIS3DH connection #11

Closed sommersoft closed 5 years ago

sommersoft commented 6 years ago

I needed to check the connection status to the LIS3DH without reading data. I just pulled this code down from the begin() function where it checks the connection.

I've run and tested the isAlive() function on an Adafruit HUZZAH ESP8266. No other platforms have been tested. Can't imagine it will be a problem on any other platform though, since the code is exactly the same that was already in begin().

I did not update any of the examples to reflect usage, but I would be more than happy to.

hoffmannjan commented 5 years ago

this is added in #17 Thanks!