Skip to content

Extension module

ErnGusMik edited this page Apr 26, 2023 · 2 revisions

Main LED

Configuring the main LED on the RMTT extension module

Turn light off

tello.set_light_off()

Possible responses: led ok/led error

Set light color

tello.set_light_color(r, g, b)

Possible responses: led ok/led error Parameters:

  • r: R value in RGB. Int from 0 to 255
  • g: G value in RGB. Int from 0 to 255
  • b: B value in RGB. Int from 0 to 255

Set light to pulse (one color)

tello.set_light_pulse(r, g, b, frq)

Possible responses: led ok/led error Parameters:

  • r: R value in RGB. Int from 0 to 255
  • g: G value in RGB. Int from 0 to 255
  • b: B value in RGB. Int from 0 to 255
  • frq: pulse frequency in Hz. Float or Int from 0.1 to 2.5

Set light to flash (two colors)

tello.set_light_flash(r1, g1, b1, r2, g2, b2, frq)

Possible responses: mled ok/mled error Parameters:

  • r1: R value in RGB (first color). Int from 0 to 255
  • g1: G value in RGB (first color). Int from 0 to 255
  • b1: B value in RGB (first color). Int from 0 to 255
  • r2: R value in RGB (second color). Int from 0 to 255
  • g2: G value in RGB (second color). Int from 0 to 255
  • b2: B value in RGB (second color). Int from 0 to 255
  • frq: flash frequency in Hz. Float or Int from 0.1 to 10

Matrix display

Configure the matrix display (under the main LED)

Display a pattern

tello.set_display_pattern(xxxx)

Possible responses: matrix ok/matrix error Parameters:

  • xxxx: a string of r, b, p, 0 (red, blue, purple, off) with a max length of 64. (eg. 000rrrbbbppp means the first 3 will be off, the next 3 will be red, the next 3 blue, the next 3 purple and the rest (unspecified ones) off)

Turn the display off

tello.set_display_blank()

Possible responses: matrix ok/matrix error

Display moving text

tello.set_display_string(direction, color, frame_rate, string)

Possible responses: matrix ok/matrix error Parameters:

  • direction: string l, r, u or d, meaning left, right, up and down respectively.
  • color: string r, b or p, meaning red, blue and purple respectively.
  • frame_rate: frame rate in Hz. Int or Float between 0.1 and 2.5
  • string: text to be displayed. Cannot exceed 70 chars.

Display moving pattern

tello.set_display_moving_image(direction, frame_rate, pattern)

Possible responses: matrix ok/matrix error Parameters:

  • direction: string l, r, u or d, meaning left, right, up and down respectively.
  • frame_rate: frame rate in Hz. Int or Float between 0.1 and 2.5
  • pattern: pattern to be displayed (see Display a Pattern above). String that cannot exceed 64 chars.

Display a static ASCII character or pattern

tello.set_display_ascii_character(character, color)

Possible responses: matrix ok/matrix error Parameters:

  • character: 'heart' or a character that can be encoded to ASCII.
  • color: string r, b or p, meaning red, blue and purple respectively.

Set display boot pattern

tello.set_display_boot(pattern)

Possible responses: matrix ok/matrix error Parameters:

  • pattern: pattern to display (see Displaying a Pattern above). String that cannot exceed 64 chars

Clear display boot pattern

tello.clear_display_boot()

Possible responses: matrix ok/matrix error

Set display brightness

tello.set_display_brightness(brightness)

Possible responses: matrix ok/matrix error Parameters:

  • brightness: brightness for the display. Int from 0 to 255.

Other

Miscellaneous

Get ToF (distance to nearest object in front)

tello.get_tof()

Possible responses: tof xxxx. xxxx is the distance in mm. If the detection distance (~1.5m) is exceeded, returns 8192

Get ESP32 firmware version

tello.get_esp32_version()

Possible responses: esp32vx.x.x.x where x.x.x.x is the version