From 4cf9c1e400d7772317fc7d8147489c17b8be7288 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 24 Sep 2022 18:33:31 -0400 Subject: [PATCH] changed i2c1 to i2c0 --- cubesatsim/cubesatsim.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index eda71806..5cf4bbf4 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -2214,7 +2214,7 @@ void read_ina219() float current_mA = 0; float loadvoltage = 0; - if (i2c1) { + if (i2c0) { 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; - i2c1 = i2c2 = i2c3 = i2c4 = i2c5 = i2c6 = i2c7 = i2c8 = false; + i2c0 = 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); - i2c1 = ina219_1_0x40.begin(); // check i2c bus 1 + i2c0 = ina219_1_0x40.begin(); // check i2c bus 1 i2c2 = ina219_1_0x41.begin(); i2c3 = ina219_1_0x44.begin(); // ina219_1_0x45.begin();