Update cubesatsim.ino

pull/152/head
alanbjohnston 4 years ago committed by GitHub
parent 74f85d8d58
commit 323ea18fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1449,11 +1449,20 @@ void read_ina219()
float current_mA = 0;
float loadvoltage = 0;
shuntvoltage = ina219_2_0x44.getShuntVoltage_mV();
busvoltage = ina219_2_0x44.getBusVoltage_V();
current_mA = ina219_2_0x44.getCurrent_mA();
shuntvoltage = ina219_1_0x40.getShuntVoltage_mV();
busvoltage = ina219_1_0x40.getBusVoltage_V();
current_mA = ina219_1_0x40.getCurrent_mA();
loadvoltage = busvoltage + (shuntvoltage / 1000);
Serial.print("1 0x40 Voltage: ");
Serial.print(loadvoltage);
Serial.print("V Current: ");
Serial.print(current_mA);
Serial.println(" mA");
voltage[0] = loadvoltage;
current[0] = current_ma;
}
void read_sensors()

Loading…
Cancel
Save

Powered by TurnKey Linux.