I've been trying to use the ina219 current sensor to measure the current drawn by a raspberry pi. But all tutorials I find on the web only measure the current of another circuit (like an LED that is powered by a battery: this is the most referred I've seen around).
I tried powering the Pi through the ina219, but it does not turn on. If I connect it in parallel (the battery goes through the sensor, to the Pi, AND directly to the Pi), it turns on, but I don't know if it is a good practice.
What I need is the Raspberry Pi to measure the current drawn by the Pi itself from a battery. If INA219 is not suitable, are there other options?
I figured my INA was not working properly. Got a new one.
Then, if I connect both the I2C AND the supply through the ina, to the RPi, I get readings from it. No need to connect in parallel as I described.