Home » DEVELOPERS » Tutorials » Read battery voltage – MRPiZ

In this tutorial you will learn how to read the battery voltage of the MRPiZ robot.

Read the voltage

  • Start the python interpreter:
$ python

img1_led

  • import the mrpiZ_lib library:
>>> from mrpiZ_lib import *
  • read the battery voltage :
>>> battery()

The voltage of the battery should be displayed in the python console.

img3

by-sa