From 149cc7051e7fc59a4619fada562534e1c7198674 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 24 Sep 2022 18:36:06 -0400 Subject: [PATCH] changed to i2c_1 --- cubesatsim/cubesatsim.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 5cf4bbf4..ee55c2af 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -2214,7 +2214,7 @@ void read_ina219() float current_mA = 0; float loadvoltage = 0; - if (i2c0) { + if (i2c_1) { shuntvoltage = ina219_1_0x40.getShuntVoltage_mV(); busvoltage = ina219_1_0x40.getBusVoltage_V(); current_mA = ina219_1_0x40.getCurrent_mA(); @@ -2989,7 +2989,7 @@ void start_ina219() { Serial.println(PI_3V3_PIN); ina219_started = true; - i2c0 = i2c2 = i2c3 = i2c4 = i2c5 = i2c6 = i2c7 = i2c8 = false; + i2c_1 = i2c2 = i2c3 = i2c4 = i2c5 = i2c6 = i2c7 = i2c8 = false; #ifndef PICO_0V1 // check if Pi is present by 3.3V voltage @@ -3011,7 +3011,7 @@ void start_ina219() { #endif sleep(0.1); - i2c0 = ina219_1_0x40.begin(); // check i2c bus 1 + i2c_1 = ina219_1_0x40.begin(); // check i2c bus 1 i2c2 = ina219_1_0x41.begin(); i2c3 = ina219_1_0x44.begin(); // ina219_1_0x45.begin();