Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Python (http://www.chiefdelphi.com/forums/forumdisplay.php?f=187)
-   -   Reading battery voltage Raspberry Pi (http://www.chiefdelphi.com/forums/showthread.php?t=149699)

Ngang 28-07-2016 12:20

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?

euhlmann 28-07-2016 12:44

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)


All times are GMT -5. The time now is 21:40.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi