|
@@ -125,7 +125,7 @@ adc1:setting(ads1115.GAIN_6_144V, ads1115.DR_128SPS, ads1115.SINGLE_0, ads1115.C
|
|
|
local function comparator(level, when)
|
|
|
-- read adc result with read() when threshold reached
|
|
|
gpio.trig(alert_pin)
|
|
|
- volt, volt_dec, adc, sign = ads1:read()
|
|
|
+ volt, volt_dec, adc, sign = adc1:read()
|
|
|
print(volt, volt_dec, adc, sign)
|
|
|
end
|
|
|
gpio.mode(alert_pin, gpio.INT)
|