Adafruit ADS1115 cpp

Talk about Adafruit Raspberry Pi® accessories!

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

Postby mikejr88 » Sat Dec 01, 2012 11:11 am

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 39 times


Thanks,
Mike
mikejr88
 
Posts: 20
Joined: Sat Jul 25, 2009 8:46 am

Re: Adafruit ADS1115 cpp

Postby fernandog » Tue Dec 11, 2012 10: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
$ 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 10:10 pm

Re: Adafruit ADS1115 cpp

Postby mikejr88 » Fri Jan 04, 2013 6:20 pm

mikejr88
 
Posts: 20
Joined: Sat Jul 25, 2009 8:46 am

Re: Adafruit ADS1115 cpp

Postby dkossman » Mon Jan 07, 2013 1: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 10:02 pm

Re: Adafruit ADS1115 cpp

Postby mikejr88 » Mon Jan 07, 2013 6: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: 20
Joined: Sat Jul 25, 2009 8:46 am


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: john444, mibignistinly and 1 guest

Stuff to buy from the Adafruit store and links to product documentation!


New Products [108]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[31]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[34]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]