# Lcd Functions Overview

## Description

Lcd functions allow scripts to interact with the transmitter display. This access is limited to the `run` function of One-Time and Telemetry scripts, and the `refresh` function of Widget scripts on radios with color display.

## Notes:

The run function is periodically called when the screen is visible. In OpenTX 2.0 each invocation starts with a blank screen (unless lcd.lock() is used). Under OpenTX 2.1 screen state is always persisted across calls to the run function. **Many scripts originally written for OpenTX 2.0 require a call to lcd.clear() at the beginning of their run function in order to display properly under 2.1 and 2.2.**

For Widget scripts, `lcd.clear()` is not needed, as each invocation starts with a blank screen showing the theme background. But it can be used to overwrite the theme background with another color by calling `lcd.clear(color)`.

Please see above for a description of the constants for [flags and patterns](/2.10/part_iii_-_opentx_lua_api_reference/constants/flags-and-pattern-constants.md), [colors](/2.10/part_iii_-_opentx_lua_api_reference/constants/color-constants.md), and [screen size](/2.10/part_iii_-_opentx_lua_api_reference/constants/screen-constants.md) that can be used with lcd drawing functions.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://luadoc.edgetx.org/2.10/part_iii_-_opentx_lua_api_reference/lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
