ads1115plus - ADS1115 Drive#
Adaptation status unknown
Note
This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!
Example
require 'ads1115plus'
sys.taskInit(function ()
i2c.setup(i2cid, i2c_speed)
ads1115plus.Setup(i2cid) -- Initialization once
while true do
log.info("ads1115:",ads1115plus.task_read(5))
sys.wait(1000)
end
end)
ads1115plus.Setup(i2c_id)#
ADS1115 Initialization
Parameters
Incoming Value Type |
Explanation |
---|---|
number |
The i2c bus id |
Return Value
return value type |
explanation |
---|---|
bool |
Successful return true |
Examples
i2c.setup(0, i2c_speed)
ads1115plus.Setup(0)
ads1115plus.task_recv(MU1,FSR)#
Get ADS1115 raw data
Parameters
Incoming Value Type |
Explanation |
---|---|
number |
MUX:Channel selection 0-7 MUX=0 AIN0 AIN1 MUX=7 AIN3 GND |
Return Value
None
Examples
None
ads1115plus.task_read(MU1)#
ADS1115 Read mv value
Parameters
Incoming Value Type |
Explanation |
---|---|
number |
The i2c bus id |
Return Value
return value type |
explanation |
---|---|
number |
ADC mv data of, if the read fails, it will return nil |
Examples
log.info("ads1115plus:",ads1115plus.task_read(5))