How to install and use Betaflight LUA script on your OpenTX transmitter

Betaflight Lua Script

Would you like to easily change your PID’s, rates, filters, rx settings, vtx settings, gps settings and more using your OpenTX Transmitter (FrSky, Jumper, RadioMaster, etc!)? Than this guide is a must read for you! In this guide, I will briefly tell you what a Betaflight LUA script is, how it works and how you can use it yourself using a few simple steps!

Please note that the Betaflight LUA script can run on lot’s of different OpenTX transmitters. Officially supported are all transmitters running on X9, X7, NV14 or Horus Firmware. This guide will be general for all models, and we will use a FrSky Taranis X9D as reference.

What is a Betaflight LUA script?

Let’s start with answering the question what a Betaflight LUA script is. Simply put, it’s a piece of software (written in the LUA language) that runs on top of the OpenTX software. This software enables you to use your OpenTX transmitter display to easily change the most important settings of Betaflight directly from your transmitter.

A few of the settings you can change using this script are:

  • PID’s
  • Advanced PID’s
  • Rates
  • Filters
  • VTX power/channel
  • GPS settings
This are all the settings that you are able to change. Please note: I didn’t had my quad connected, so you don’t see any values.

What do you need?

Obiously you need a transmitter running OpenTX. In this guide I assume you are running the latest OpenTX. At 2-5-2020, while writing this guide, this is OpenTx 2.3.7 build on 28-03-2020.

How to install Betaflight LUA script

First check that you are running OpenTX 2.3.1 or newer on your transmitter. Check your version by turning on your transmitter, long press menu button and then click the page button (or use the scroll wheel) to go to the “VERSION” tab.


Note: You can also use older versions of OpenTX, but we advise you to update to a recent version. Oscar Liang wrote a good guide how you can update to a recent version, check it here: https://oscarliang.com/flash-opentx-firmware-taranis/


Once you’ve verified you are using OpenTX 2.3.1 or newer, go to https://github.com/betaflight/betaflight-tx-lua-scripts/releases and download “betaflight-tx-lua-scripts_1.4.1.zip” under the assets tab.

Open the downloaded zip file and browse into the “obj” folder. Unpack the BF, SCRIPTS and SOUNDS folder to the root of your transmitter’s sd card. How to access the SD card depends a on the transmitter used. Most transmitter’s SD cards can be accessed by powering on the transmitter while holding two of the trims to access the bootloader menu. Then simply plug in a USB cable and you should see your sd card.

Access your sd card by powering on while holding the two trims inward.

After transferring the BF, SCRIPTS and SOUNDS folder to the root of your transmitter’s sd card, unplug your transmitter from your pc and turn off and on your transmitter. That’s all! Your BF Lua script is now installed and ready to use!

How to use the Betaflight LUA script

To open the BF LUA script in OpenTX:

  • Long press menu button
  • Press page button to go to the SD-HC Card tab
  • Press Enter on the BF folder
  • Scroll to bf.luac and long press Enter
  • Press Enter on the SCRIPTS folder
  • Press Enter on the TOOLS folder
  • Scroll to bf.lua and long press Enter
  • Choose Execute

You now will see the first page of the script, showing the PID’s. You can navigate through the script as follow:

  • Next page: short press Page button
  • Previous page: long press Page button
  • Change values:
    – navigate to value using + and – buttons
    – change value bij short pressing enter button
  • Save values: long press Enter button, go to save page, short press enter button
  • Reload page: long press Enter button, to to reload, short press enter button
  • Exit lua script: long press exit button

Please note that you will only see your settings through the LUA script if you have a working telemetry link between your OpenTX transmitter and your Flight Controller.

We love to hear from you in the comments if all went well!

Update history

  • 11 December 2020: Changed needed OpenTX version and navigation to bf.lua file

4 Comments on “How to install and use Betaflight LUA script on your OpenTX transmitter”

  1. there is no “bf.luac” in the folder, only “vtx_defaults.lua”.
    When I execute this one, nothing happens.

    1. Hi Tony,

      You are totally right. I checked it, and the developers of the script moved some files around with newer versions of the Betaflight LUA script. I updated the guide. Only this part is changed:

      To open the BF LUA script in OpenTX:

      • Long press menu button
      • Press page button to go to the SD-HC Card tab
      • Press Enter on the BF folder
      • Scroll to bf.luac and long press Enter
      • Press Enter on the SCRIPTS folder
      • Press Enter on the TOOLS folder
      • Scroll to bf.lua and long press Enter
      • Choose Execute

  2. Being an oldman and bored , I bought a TX16S, just to keep the gray matter active. To tell the truth I was somewhat disappointed at first, then there were all these things I’d never seen, still not sure what some are or how to use them. Mean while I work on a YRF-4E, requires at least 10 channels to fly, but there are so many things to be adjusted… who would have guessed adding a canard to a RF4B could result in such complexity … know why others haven’t modeled it, the prototype flew until the battery ran out so the concept would fly, then came 5 that didn’t … then the USAF lost the real plane … I think it joined the QF program …lol. Thanks for the assist on adding this beta flight thingy …it allows a few new features .

Leave a Reply

Your email address will not be published. Required fields are marked *