From 5a14c381b3814a7124443c0ac0d4afa803354ec5 Mon Sep 17 00:00:00 2001 From: Jon H Date: Mon, 24 Jan 2022 22:23:44 +0000 Subject: [PATCH] Fix bug with Raspberry Pi 4 and the 'Bullseye' (October 2021) Raspberry Pi OS and onward https://github.com/chrisb2/pi_ina219#i2c-bus-number --- Voltage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Voltage.py b/Voltage.py index 3fcf6d0..4d23307 100755 --- a/Voltage.py +++ b/Voltage.py @@ -7,7 +7,7 @@ SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 0.2 -ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO, address=0x42) +ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO, address=0x42, busnum=1) ina.configure(ina.RANGE_16V, ina.GAIN_AUTO) def measure():