A library for ADS1015 and ADS1115 from Texas Instruments.

Dependents:   IGGE_Power ADS1015-hello_world ADS1115-hello_world frdm_rtos_Eth ... more

Use like this

#include "mbed.h"
#include "Adafruit_ADS1015.h"
#include "USBSerial.h"

#define SERIAL_BAUD_RATE    9600

I2C i2c(p23, p18);
Adafruit_ADS1015 ads(&i2c);
USBSerial pc; // USB CDC serial port

 
int main() {
    uint16_t reading;
    while (1) {
        reading = ads.readADC_SingleEnded(0); // read channel 0
        pc.printf("reading: %d\r\n", reading); // print reading    
        wait(2); // loop 2 sek
    }
}

Library ported from Arduino at github repository.

Breakout boards from Adafruit: http://learn.adafruit.com/adafruit-4-channel-adc-breakouts/overview

GitHub repository: https://github.com/adafruit/Adafruit_ADS1X15

Revision:
1:659ccb9047ed
Parent:
0:8174d9ceeca1
--- a/LICENSE.txt	Sun Nov 10 18:22:27 2013 +0000
+++ b/LICENSE.txt	Sun Nov 10 18:44:47 2013 +0000
@@ -1,6 +1,6 @@
 Software License Agreement (BSD License)
 
-Copyright (c) 2012, Adafruit Industries, Arve Seljebu
+Copyright (c) 2012, Adafruit Industries
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without