2020-02-10, 02:13 AM
i don't know about python for a ina219. But in C you can set the device. shunt value, max amps, max main voltage, bits and sample rates. If the shunt on the module is left in place you need to calculate the total shunt value as resistors in parallel.
The ina219 module can only handle 3.2 amps.
The ina219 module can only handle 3.2 amps.
Code:
ina219.begin();
// setting up our configuration
// default values are RANGE_32V, GAIN_8_320MV, ADC_12BIT, ADC_12BIT, CONT_SH_BUS
ina219.configure(INA219::RANGE_16V, INA219::GAIN_1_40MV, INA219::ADC_128SAMP, INA219::ADC_128SAMP, INA219::CONT_SH_BUS);
// calibrate with our values
ina219.calibrate(SHUNT_R, SHUNT_MAX_V, BUS_MAX_V, MAX_CURRENT);