Skip to content

ads1115 library to read single-shot or continuous mode voltages; Raspberry Pi using WiringPi

Notifications You must be signed in to change notification settings

wryan67/ads1115_rpi_lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADS1115 Raspberry Pi Library

This library reads the ADS1115 chip and returns the voltage on the selected pin to the calling program. The example app will read an ADS1115 chip and print the voltage values from pins a0-a3 on the screen.

Copyright (c) 2019 Wade Ryan

Requirements

On your Raspberry Pi, please use the raspi-config program to enable the I2C interface. Then use the gpio command to make sure your i2c devices can be found. The default address for an ADS1115 chip is 0x48.

$ sudo raspi-config
$ gpio i2cd

Download

Use git to download the software from github.com:

$ cd ~/projects { or wherever you keep downloads }
$ git clone https://github.com/wryan67/ads1115_rpi_lib.git

Install

To compile this library, navigate into the src folder and use the make utility to compile and install the library.

$ cd [project folder]
$ cd src
$ make && sudo make install

Compiling

Complie your applications using these command line arguments: -lwiringPi -lwiringPiADS1115rpi

Example

To run the example program, nagaviate into the example folder and use make to compile the program. The timestamp

$ cd ../example
$ make 
$ ./knobtest
$ $ accessing ads1115 chip on i2c address 48
$ Timestamp       Delta       A0       A1       A2       A3
$ 1575219689268      44     1.73     3.91     0.00     0.00

Datasheet

https://cdn-shop.adafruit.com/datasheets/ads1115.pdf

About

ads1115 library to read single-shot or continuous mode voltages; Raspberry Pi using WiringPi

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published