Skip to main content

get_colors()

Description#

get_colors() is a getter function that accesses color data by using the default ByRobot color prediction

Syntax#

get_colors()

Parameters#

None

Returns#

A list containing the front and back color sensor prediction.

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