|
34 | 34 | ** ** |
35 | 35 | ** Vers. Date Developer Comments ** |
36 | 36 | ** ====== ========== ============================= ============================================================== ** |
| 37 | +** 1.0.4 2018-06-01 https://github.com/SV-Zanshin https://github.com/SV-Zanshin/INA226/issues/11 Corrected loop ** |
37 | 38 | ** 1.0.3 2017-09-18 https://github.com/SV-Zanshin https://github.com/SV-Zanshin/INA226/issues/6 Multiple INA226s ** |
38 | 39 | ** 1.0.2 2017-08-09 https://github.com/SV-Zanshin Cosmetic changes ** |
39 | 40 | ** 1.0.1 2017-01-12 https://github.com/SV-Zanshin Minor code cleanup and added more comments ** |
@@ -86,19 +87,19 @@ void loop() { // |
86 | 87 | Serial.print(F("Bus voltage ")); // // |
87 | 88 | Serial.print(i+1); // // |
88 | 89 | Serial.print(F(": ")); // // |
89 | | - Serial.print((float)INA226.getBusMilliVolts()/1000.0,4); // Convert to millivolts // |
| 90 | + Serial.print((float)INA226.getBusMilliVolts(true,i)/1000.0,4); // Convert to millivolts // |
90 | 91 | Serial.print(F("V\nShunt voltage ")); // // |
91 | 92 | Serial.print(i+1); // // |
92 | 93 | Serial.print(F(": ")); // // |
93 | | - Serial.print((float)INA226.getShuntMicroVolts()/1000.0,3); // Convert to millivolts // |
| 94 | + Serial.print((float)INA226.getShuntMicroVolts(true,i)/1000.0,3); // Convert to millivolts // |
94 | 95 | Serial.print(F("mV\nBus amperage ")); // // |
95 | 96 | Serial.print(i+1); // // |
96 | 97 | Serial.print(F(": ")); // // |
97 | | - Serial.print((float)INA226.getBusMicroAmps()/1000.0,3); // Convert to milliamp // |
| 98 | + Serial.print((float)INA226.getBusMicroAmps(i)/1000.0,3); // Convert to milliamp // |
98 | 99 | Serial.print(F("mA\nBus wattage ")); // // |
99 | 100 | Serial.print(i+1); // // |
100 | 101 | Serial.print(F(": ")); // // |
101 | | - Serial.print((float)INA226.getBusMicroWatts()/1000.0,3); // Convert to milliwatts // |
| 102 | + Serial.print((float)INA226.getBusMicroWatts(i)/1000.0,3); // Convert to milliwatts // |
102 | 103 | Serial.println(F("mW")); // // |
103 | 104 | Serial.println(); // // |
104 | 105 | } // of for-next each device loop // // |
|
0 commit comments