DavidEGrayson / minimu9-ahrs

Program for reading data from the Pololu MinIMU-9 over I²C. Works on the Raspberry Pi and other embedded ARM Linux boards.
Other
167 stars 68 forks source link

Using library in another project #45

Closed nam-lu closed 3 years ago

nam-lu commented 3 years ago

I was wondering if it is possible to include this library as a dependency in another C++ project and programmatically pull sensor data in code? I was able to get it working on the CLI but am not sure how to include it in my project. I'm new to C++ so I was trying to figure out if it was possible.

Thank you!

DavidEGrayson commented 3 years ago

This project is not designed to be a library: it's designed to be a program. So you should consider just using it that way. You can run it and read data from it using your C++ program, using the methods you would use to run any other command-line utillity.

If there's something you want to do that the command-line utility doesn't give you or you really just want to have a library, you might consider copying the source code files of interest to you into your project along with LICENSE.txt.