Giter Site home page Giter Site logo

berndporr / rpi_ad7705_daq Goto Github PK

View Code? Open in Web Editor NEW

This project forked from graeme-hattan/rpi_ad7705_test_software

9.0 2.0 10.0 1.01 MB

Test/demo program for using the AD7705 with the Raspberry Pi and demo how to display data on a website with FastCGI.

C++ 87.55% CMake 11.71% Shell 0.74%
raspberry-pi daq adc adc-device real-time realtime background-worker background-process

rpi_ad7705_daq's Introduction

Data acquisition with the AD7705 on the raspberry PI!

The AD7705 is a two channel sigma delta converter which has differential inputs, a PGA and programmable data rates. It's perfect for slowly changing inputs such as pressure, temperature, heart rate etc.

This repo offers the class AD7705Comm which does all the low level communications with the AD7705. The user just need to register a callback handler which then returns the samples in realtime.

The class uses the DRDY of the AD7705 connected to Port 22 and waits for a falling edge on this port to read the data. This is done via interrupts / poll so that the ADC process sleeps until new data becomes available.

Hardware design

The design files (for EAGLE) are in the subdirectory "pcb".

alt tag

Building:

To build:

cmake .

make

Install

sudo make install

Usage example

In the subdir example is a simple application which prints the ADC data to the screen.

cd example
sudo ./ad7705_printer

General usage

The online doc is here: http://berndporr.github.io/rpi_AD7705_daq/

Callback handler

class AD7705printSampleCallback : public AD7705callback {
	virtual void hasSample(float v) {
		// process your sample here
	}
};

Main program

Instantiate the AD7705 class and the callback handler:

	AD7705Comm ad7705comm;
	AD7705printSampleCallback ad7705printSampleCallback;
	ad7705comm.setCallback(&ad7705printSampleCallback);

Start the data acquisition:

	ad7705comm.start();

once start has been called the data will be arriving.

Stop the data acquisition:

	ad7705comm.stop();

Author: Bernd Porr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.