|
|
|
|
@ -14,6 +14,9 @@ int main(int argc, char *argv[]) {
|
|
|
|
|
debug = ON;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
wiringPiSetup ();
|
|
|
|
|
|
|
|
|
|
printf("\n");
|
|
|
|
|
@ -68,6 +71,15 @@ int main(int argc, char *argv[]) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
printf("CubeSatSim v1.1 INA219 Voltage and Current Telemetry\n");
|
|
|
|
|
map[MINUS_X] = MINUS_Y;
|
|
|
|
|
map[PLUS_Z] = MINUS_X;
|
|
|
|
|
map[MINUS_Y] = PLUS_Z;
|
|
|
|
|
snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(3));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reading I2C voltage and current sensors
|
|
|
|
|
// printf("Starting\n");
|
|
|
|
|
@ -128,6 +140,7 @@ int main(int argc, char *argv[]) {
|
|
|
|
|
printf("-Z | % 4.2f V % 5.0f mA \n", voltage[map[MINUS_Z]], current[map[MINUS_Z]]);
|
|
|
|
|
printf("Bat | % 4.2f V % 5.0f mA \n", voltage[map[BAT]], current[map[BAT]]);
|
|
|
|
|
printf("Bus | % 4.2f V % 5.0f mA \n\n", voltage[map[BUS]], current[map[BUS]]);
|
|
|
|
|
fclose(file1);
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|