-
Notifications
You must be signed in to change notification settings - Fork 41
_EEPROM_offset
This is an unsigned 16-bit integer value which defaults to 0 but can be set by the user to allow the INA library device information to be stored beginning at the "_EEPROM_offset" address rather than at the beginning of the EEPROM. If it is changed, it must be done before calling the begin() function. If it is changed afterwards, the program will cease to read correct values from EEPROM for all INA devices.
No range error checking is performed.
INA_Class INA(); // Instantiate the class
void setup() {
INA._EEPROM_offset = 32; // first 32 bytes of EEPROM reserved, start after that
INA.begin(1,100000); // 1A max current and a 0.1 Ohm shunt resistor
// Note that a power resistor should be used
// to dissipate sufficient generated heat,
// Watts = Amps² x Resistance (0.1W in this case)
} // 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()