And I believe I have my ADS1115 working with my Pi.
Hope this helps someone and I welcome feedback.
Thanks,
Mike
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/
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/
- fernandog
- Posts: 2
- Joined: Mon Dec 03, 2012 11:10 pm
Re: Adafruit ADS1115 cpp
Thanks Mike. I am pretty new at this, I downloaded the tarball, ran make, ran main, and this is what I got.
My addr is ground + addr (x48). Any tips?
Thank you.
Code: Select all
$ 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
Thank you.
- mikejr88
- Posts: 36
- Joined: Sat Jul 25, 2009 9:46 am
Re: Adafruit ADS1115 cpp
here is a good place to start
http://learn.adafruit.com/adafruit-16-c ... pi-for-i2c
http://learn.adafruit.com/adafruit-16-c ... pi-for-i2c
- dkossman
- Posts: 10
- Joined: Mon Dec 03, 2012 11:02 pm
Re: Adafruit ADS1115 cpp
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
Just edit the two "open" calls in I2C_RW.cpp
Don
- mikejr88
- Posts: 36
- Joined: Sat Jul 25, 2009 9:46 am
Re: Adafruit ADS1115 cpp
Good catch Don, Thanks.
I missed it. I should have read more, in stead of looking at the pictures.
http://elinux.org/RPi_Low-level_peripherals
Mike
I missed it. I should have read more, in stead of looking at the pictures.
http://elinux.org/RPi_Low-level_peripherals
Mike
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/
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/