Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

Adafruit ADS1115 cpp
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Adafruit ADS1115 cpp

by mikejr88 on Sat Dec 01, 2012 12:11 pm

And I believe I have my ADS1115 working with my Pi. :D
Hope this helps someone and I welcome feedback.
ADS1115.tar
(4.04 KiB) Downloaded 64 times


Thanks,
Mike
mikejr88
 
Posts: 35
Joined: Sat Jul 25, 2009 9:46 am

Re: Adafruit ADS1115 cpp

by fernandog on Tue Dec 11, 2012 11:26 pm

Thanks Mike. I am pretty new at this, I downloaded the tarball, ran make, ran main, and this is what I got.
Code: Select all | TOGGLE FULL SIZE
$ sudo ./main
Failed to write device(-1): Input/output error
Failed to write reg: Input/output error
Difference 0 and 1 = -29555
Failed to write device(-1): Input/output error
Failed to write reg: Input/output error
Difference 2 and 3 = -29300
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write reg: Input/output error
Camparator = 0

My addr is ground + addr (x48). Any tips?

Thank you.
fernandog
 
Posts: 1
Joined: Mon Dec 03, 2012 11:10 pm

Re: Adafruit ADS1115 cpp

by mikejr88 on Fri Jan 04, 2013 7:20 pm

mikejr88
 
Posts: 35
Joined: Sat Jul 25, 2009 9:46 am

Re: Adafruit ADS1115 cpp

by dkossman on Mon Jan 07, 2013 2:46 am

Just ran into the same thing. For a rev 2 (new/latest) Pi, you need to use /dev/i2c-1 instead of /dev/i2c-0
Just edit the two "open" calls in I2C_RW.cpp

Don
dkossman
 
Posts: 10
Joined: Mon Dec 03, 2012 11:02 pm

Re: Adafruit ADS1115 cpp

by mikejr88 on Mon Jan 07, 2013 7:13 pm

Good catch Don, Thanks.
I missed it. I should have read more, in stead of looking at the pictures. :oops:
http://elinux.org/RPi_Low-level_peripherals

Mike
mikejr88
 
Posts: 35
Joined: Sat Jul 25, 2009 9:46 am