changed i2c1 to i2c0

pico-i2c
alanbjohnston 3 years ago committed by GitHub
parent 1e0f478eb8
commit 4cf9c1e400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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();

Loading…
Cancel
Save

Powered by TurnKey Linux.