Skip to main content

get_battery()

Description#

This function returns the current battery level percentage of the drone.

Syntax#

get_battery()

Parameters#

NONE

Returns#

The current battery percentage of the drone's battery.

Example Code#
Python#
#Python code
from codrone_edu.drone import *
drone = Drone()
drone.pair()
battery = drone.get_battery()
print(battery)
drone.close()