-
Notifications
You must be signed in to change notification settings - Fork 41
getDeviceAddress()
Arnd edited this page Feb 9, 2019
·
1 revision
This function returns the I2C address of "deviceNumber".
INA_Class INA(); // Instantiate the class
void setup() {
uint8_t deviceCount = INA.begin(10,100000); // 10 Amp Maximum bus with a shunt resistor of 0.1 Ohm
Serial.print("Found ");
Serial.print(deviceCount);
Serial.println(" INA2xx devices");
for (uint8_t i=0;i<deviceCount;i++) {
Serial.print("Device ");
Serial.print(i);
Serial.print(" is at address ");
Serial.print(INA.getDeviceAddress(i));
Serial.print(" (0x");
Serial.print(INA.getDeviceAddress(i),HEX);
Serial.println(")");
} // of for-next all devices
} // of setup
void loop() {
// code Comes here
} // 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()