This article explains how to write a C++ library to control and monitor the LSM9DS1 IMU sensor using an Arduino. If you want to really understand how a sensor operates, then write a library for it. It will take longer than you think, but the effort is worthwhile. This library can be downloaded using the Arduino IDE Library Manager or directly from our GitHub repository.