Skip to main content

controller_draw_string()

Description#

Draws a string from the given x_start, x_end and y positions. The string can be aligned along the x_start and x_end positions

Syntax#

controller_draw_string(x, y, string, string_font, pixel_color)

Parameters#

x: starting x position y: starting y position string: the string to write string_font: optional parameter that is the font of the string to be written. default value is LiberationMono5x8 pixel_color: optional parameter that is the pixel color of the written string. default value is Black

Returns#

None

Example Code#
Python#
#Python code
from codrone_edu.drone import *
drone = Drone()
drone.pair()
drone.controller_clear_screen()
drone.sendDisplayDrawString(0, 0, "Hello, world!")
drone.close()