-
Notifications
You must be signed in to change notification settings - Fork 40
reset()
This function writes a reset flag to the configuration register of the INA2xx specified in the optional "deviceNumber" parameter, defaulting to resetting ALL devices. This is a software reset, which is equivalent to turning the device off and on again. The reset is fast, at 40 microseconds.
The devices will have the following default settings upon restart:
- Don't average readings
- Use a conversion speed of 1.1ms per Bus conversion
- Use a conversion speed of 1.1ms per Shunt conversion
- Continuously convert both Bus and Shunt measurements
- Calibration Register recomputed according to values set with the corresponding begin() prior to the reset.
INA_Class INA(); // Instantiate the class
void setup() {
INA.begin(10,100000); // 10A Maximum with a 0.1 Ohm shunt resistor
int32_t busMicroAmps= INA.getBusMicroAmps();
Serial.print("Bus amperage is ");
Serial.print((float)busMicroAmps/1000,3);
Serial.print(" mA\n");
INA.reset()
int32_t busMicroAmps = INA.getBusMicroAmps(); // value will now be 0
Serial.print("Bus amperage is ");
Serial.print((float)busMicroAmps/1000,3);
Serial.print(" mA\n");
} // of setup
void loop() {
} // of main loop
Overview
Installation
Class Instantiation
begin()
setI2CSpeed()
getBusMilliVolts()
getBusRaw()
getShuntMicroVolts()
getShuntRaw()
getBusMicroAmps()
getBusMicroWatts()
getDeviceAddress()
getDeviceName()
setMode()
setAveraging()
setBusConversion()
setShuntConversion()
reset()
waitForConversion()
conversionFinished()
alertOnConversion()
alertOnShuntOverVoltage()
alertOnShuntUnderVoltage()
alertOnBusOverVoltage()
alertOnBusUnderVoltage()
alertOnPowerOverLimit()