Skip to content

Instantly share code, notes, and snippets.

@funvill
Last active May 29, 2019 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save funvill/4b75cc86b02de6baef66dfb0996ec180 to your computer and use it in GitHub Desktop.
Save funvill/4b75cc86b02de6baef66dfb0996ec180 to your computer and use it in GitHub Desktop.
const int NUMBER_OF_CHANNELS = 8;
Adafruit_INA219 ina219[NUMBER_OF_CHANNELS]{ 0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48 };
for (int channel = 0; channel < NUMBER_OF_CHANNELS; channel++) {
ina219[channel].begin();
}
for (int channel = 0; channel < NUMBER_OF_CHANNELS; channel++) {
int busvoltage = ina219[channel].getBusVoltage_V();
int current_mA = ina219[channel].getCurrent_mA();
}
@funvill
Copy link
Author

funvill commented May 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment