Last active
May 29, 2019 20:32
-
-
Save funvill/4b75cc86b02de6baef66dfb0996ec180 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based off of this example https://github.com/adafruit/Adafruit_INA219/blob/master/Adafruit_INA219.h