This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to use Adafruit sensors with nrf52 through TWI/I2C?

Hello,

I would like to make use of an Adafruit sensor Adafruit_TSL2591 connected to my nrf52 through the TWI interface. I have seen the example TWI master device, in that example the sensor is addressed directly, however this adafruit sensor has already implemented a library in arduino ( but is in C++).

Would it be possible make use of such as an example (TWI master) and combine it with the adafruit library?

On the other hand, how can I compile a C++ project in the nrf52 sdk, I see that all the examples are in C so I expect some issues while compiling. Is there a makefile for compiling in C++ ?

Thanks in advance EDIT attached library MPU9250.cpp MPU9250.h

Related