|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Reading battery voltage Raspberry Pi
Hi, I'm working on a project with the Raspberry Pi 2. It's hooked up to a servo HAT and a battery pack. Is there a way to read the voltage on the battery? Maybe by reading how much goes into the Pi?
|
|
#2
|
||||
|
||||
|
Re: Reading battery voltage Raspberry Pi
The Pi does not have analog inputs by default. However, by using an ADC you can read analog voltages. I've had good results with the MCP3008 in the past (although I wouldn't recommend using Adafruit's tutorial code for it - use the Pi's actual SPI libraries; they should be more reliable)
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|