This commit is contained in:
@@ -117,7 +117,7 @@ float INA233::getBusVoltage() {
|
||||
|
||||
float INA233::getShuntVoltage() {
|
||||
uint16_t rawVoltage = get_word(INA233::_address, REGISTER_READ_VSHUNT);
|
||||
float voltage = rawVoltage * pow(10,-4);
|
||||
float voltage = rawVoltage * 2.5e-6;
|
||||
|
||||
return voltage;
|
||||
}
|
||||
@@ -186,4 +186,8 @@ uint16_t INA233::getConfigRegister() {
|
||||
|
||||
void INA233::reset() {
|
||||
sendByte(INA233::_address, 0x12, 0x00);
|
||||
}
|
||||
|
||||
void INA233::setCalibrationRegister(int value) {
|
||||
sendWord(INA233::_address, 0xD4, value);
|
||||
}
|
||||
@@ -49,6 +49,8 @@ class INA233{
|
||||
|
||||
void reset();
|
||||
|
||||
void setCalibrationRegister(int value);
|
||||
|
||||
bool isConnected(void);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user