ad7190 library

A C and C++ Library for AD7190 with BeagleBone

A couple of days back, I started working on a project i.e. A Smart Portable Heart Rate Monitoring Device for which I am using a Pulse Sensor. Since the output of the pulse sensor is analogue in nature, I needed a way to digitize it for further processing. Hence, I decided to use the AD7190 24 bit ADC.

I also took this as an opportunity to write a nice Library for the AD7190  in both i.e. C and C++ 🙂

Lets cut the chase and see the working demo of the Library when built for C and C++ in the video below.

The examples consist of two threads. One thread is responsible for continuously reading the ADC data. The other thread is responsible for further processing or printing the data. I have used POSIX Threads i.e. pthreads. The two threads are synchronized using POSIX Semaphores.

I have used threads here just for fun. The Libraries are completely independent of them and can work without them as well.

The AD7190 C Library can be downloaded from my Github repository or cloned using the below command.

The AD7190 C++ Library can also be downloaded from my Github repository or cloned using the below command.

The AD7190 uses the SPI interface for communication. If you haven’t loaded the SPI device, you can do so by following the steps shown here.

Leave a Reply

Your email address will not be published. Required fields are marked *