From 8bd7a8fe7ef9f44c0663088fbb5729c6e68a93b9 Mon Sep 17 00:00:00 2001 From: Clement Remi <remi.clement@irstea.fr> Date: Sat, 2 Apr 2022 15:23:34 +0200 Subject: [PATCH] Update ohmpi.py, change the ads gain to 2/3 by default. --- ohmpi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ohmpi.py b/ohmpi.py index 649857cb..9c881d41 100644 --- a/ohmpi.py +++ b/ohmpi.py @@ -103,7 +103,7 @@ class OhmPi(object): self.mcp = MCP23008(self.i2c, address=0x20) # ADS1115 for current measurement (AB) - self.ads_current = ads.ADS1115(self.i2c, gain=16, data_rate=860, address=0x48) + self.ads_current = ads.ADS1115(self.i2c, gain=2/3, data_rate=860, address=0x48) # ADS1115 for voltage measurement (MN) self.ads_voltage = ads.ADS1115(self.i2c, gain=2/3, data_rate=860, address=0x49) -- GitLab