This library contains driver API to interface to IMUs from Analog Devices. One can also use libiio to interface to IMUs which is the recommended one. But this library can provide more control from user space and also easily portable to many systems. This is a pure C library. You can port to any systems by just implementing your own spi library. See below for details.
Currently supported IMUs:
At high speed data rates (greater than 1KHz), non-baremetal systems might have non-deterministic SPI interface which results in sample drops. iSensor-SPI-buffer board, developed by Juan and Alex, can act as a buffer between host and IMU providing necessary capabability to acquire data at very high speed. This repo implements imu_buf
library (lib/imu_buf
) for interfacing with iSensor-SPI-buffer
board.
Both the libraries are tested on Jetson Nano and can be easily run on any linux based platform with spi-dev support.
lib/imu
- contains imu driver code.lib/imu_buf
- contains driver for iSensor-SPI-buffer board.linux/
- contains linux specific spi driver and utils .tests/
- contains unit tests (TO BE IMPLEMENTED).CMakeLists.txt
- main cmake build file.examples/imu_test.c
- simple example on how to use imu/imu buf library.examples/spi_test.c
- simple example on how to use spi library.examples/gpio_test.c
- simple example on how to use gpio library.
$ cd adi_imu_driver
$ mkdir build
$ cd build
$ cmake [OPTIONS] ..
$ make -j2
OPTIONS
:
-DCMAKE_BUILD_TYPE=<DEBUG|RELEASE>
: set build type (default: RELEASE)
-DBAREMETAL=(y|n)
: to compile the library for baremetal platforms. If enabled, you should implement below methods for your platform.
-DBUILD_TESTING=<ON|OFF>
: Enables/disables testing (default: OFF)
MIT License