i2c sensor in lua script difficulty | LabJack
 

i2c sensor in lua script difficulty

2 posts / 0 new
Last post
Oli
Haemaflow's picture
i2c sensor in lua script difficulty

Dear LJ team, 

I'm having difficulty getting an i2c sensor (ADS1115) working in lua script - would you be able to give me a hand please? Please find my script attached. The sensor datasheet is here - http://www.ti.com/lit/ds/symlink/ads1115.pdf  

Many thanks for your help!

Oli

File Attachment: 
LabJack Support
labjack support's picture
When troubleshooting I2C,

When troubleshooting I2C, start by check for acknowledgements. Read the I2C_ACKS register. That will will you if the slave device is responding. If the slave device is responding then the problem lies in the command we are sending or the interpretation of the data coming back. If the slave device is not responding, then likely problems are wiring, pull-up resistors, slave address, and bad parts.

 

Documentation on the I2C_ACKS register can be found here: https://labjack.com/support/datasheets/t-series/digital-io/i2c