OpenTX Lua Mix/Custom Scripts
Contents
What Is A Custom (Mix) Script
- Takes inputs such as sticks, switches and channels
- Selected and configured from the custom scripts screen
- Produces outputs that can be used as inputs to mixes
- Used as inputs in the mixes screen
- Up to 7 mix scripts can be active per model
- Can be used more than once by the same model
- Can be used by different models
- Selected and configured using the transmitter
- Can not be selected and configured using companion
- Can not display on the screen
- Mix scripts are also known as custom scripts because they are
- Placed in the MIXES folder
- Configured in the OpenTX CUSTOM SCRIPTS screen
OpenTX Firmware
- Use OpenTX Firmware with the Lua build option selected
- Follow the instruction in the Companion For OpenTX Guide
Mix Script File Location
Setup Using The Transmitter
- Select and configure the lua mix script from the CUSTOM SCRIPTS screen
- On the MIXER screen add and configure mixes using an input from the output of the lua mix script
Sample Script Setup
- Download GtStd.lua (right click and Save As, Download Linked File)
- Place the file
SD Card > /SCRIPTS/MIXES/
- Select the model to be edited
- Press PAGE repeatedly until the CUSTOM SCRIPTS screen is displayed
- Press ENT
- Press ENT (again)
- Select GtStd
- Press ENT
- Press (-) twice to select Input – – –
- Press ENT, the – – – will flash on and off
- Press (-) or (+) to select the desired input
- Press ENT
- Press (-) to select Percent 5
- Press ENT, the 5 will flash on and off
- Press (-) or (+) to select the desired value
- Press ENT
- Move the input (in this case the throttle stick) and note the output value changing
- Note the name of the output, GtSt in this case
- Press EXIT twice
- Press PAGE repeatedly until MIXER screen is displayed
- Press (-) repeatedly until until the desired channel is selected
- Press ENT
- Press (-) to select Source
- Long Press ENT
- Press (-) to select Lua Scripts
- Press ENT
- Press EXIT repeatedly to get back to the MIXER screen
- Move the lua mix script input (the throttle stick in this case) and note the change in the channel value
This was just an introduction to using a custom script. It does not do anything useful. However now that you understand what custom scripts are and how to use them you can now use any custom script you come across.