Betaflight LUA script allows you to change flight controller settings on your OpenTX radio, such as PID, rates, VTX channels and power, and many more. In this tutorial I will show you how to setup and install Betaflight LUA script on your TX.
What You Need
You will need a radio that supports OpenTX. See my radio recommendations.
Make sure to update OpenTX on your radio (version 2.3.4 or newer). Here’s how to update OpenTX.
Full telemetry on your quad is required, make sure Telemetry feature is enabled in Betaflight. That means if you are a Frsky user and using SBUS, SmartPort is required, or if you are using FPort that should work. For TBS Crossfire users, telemetry should be working already. ExpressLRS should work too with Telemetry enabled in your build option, but makes sure to use lower telemetry ratio such as 1:8 or even 1:4.
Download Betaflight LUA script: https://github.com/
Copy Files to Radio SD Card
Turn on radio in Bootloader mode, and connect USB cable, the SD card inside the radio should pop up in your computer as an external drive. There could be a couple of external drives that appear, pick the bigger one.
Make a copy of your SD card content first.
Open the file you just downloaded from Github, open the “obj” folder, and you should see 3 folders, “BF”, “SCRIPTS”, “SOUNDS”. Just copy these 3 folders into the root directory of your SD card. Now disconnect USB and restart your radio.
To activate the BF LUA script, we used to go to the Telemetry screen, but that’s no longer the case. Now you can go into “System Settings”, then “Tools” Menu, and find “Betaflight Setup”.
For the first time, it will take a few seconds to compile the scripts, but after that it should just load the script immediately.
If it gets stuck at “initialising” screen, make sure Telemetry is actually working on your quad and that Telemetry feature is indeed enabled in Betaflight Configuration. (e.g. you should be getting battery voltage from the quad)
How to Use Betaflight LUA Script
Here’s the home screen of the Betaflight LUA script.
After changing a setting, long press ENTER, and select option “Save Page” to save changes.
NOTE: changing PID values with LUA script doesn’t play well with the slider in configurator. Once you have changed individual value it will disable the slider and you will lose the P/D ratio. Just beware of it.
Here are some of the PID settings:
Here’s the VTX settings screen:
Whenever you made a change to the VTX Table in Betaflight (such as disabling a channel or editing power values), you have to reload the data from the quad. To do this, hold down the ENTER button, and select VTX Tables, and it will download the new VTX Tables to the radio. You need to do this with different VTX (quads) too if they have different VTXTable.