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

LSM9DS1 libraries for nRF51

Hi, I have some code written for Arduino that read values in SPI from a LSM9DS1 (9-axis IMU) and I need to make it work on a nRF51.

What I have troubles with is the library to use with the LSM9DS1. The only library I have found is the library for Arduino, but it uses the Arduino SPI library to communicate with the LSM9DS1.

I think that I need to look trought the library provided for Arduino and replace the calls to Arduino SPI library by calls to the nRF51 SPI library.

Two questions :

  1. Am I right, and will it be very complex ?
  2. Is there a library for LSM9DS1 already written for nRF51/52 that I could use ?

I have found this other question ( devzone.nordicsemi.com/.../ ), but it was only about how to import the .cpp library.

Thank you very much

Parents
  • I sometimes use Arduino libraries as a starting point when writing code to read from a device, but I usually end up totally writing the code by the time I've finished

    One thing to bear in mind, that Arduino Libraries are normally C++ classes and the nRF5 SDK is C

    You can mix C and C++ in the same application, but generally for embedded development,people seem to just use C.

Reply
  • I sometimes use Arduino libraries as a starting point when writing code to read from a device, but I usually end up totally writing the code by the time I've finished

    One thing to bear in mind, that Arduino Libraries are normally C++ classes and the nRF5 SDK is C

    You can mix C and C++ in the same application, but generally for embedded development,people seem to just use C.

Children
No Data
Related