How to start writing your own LUA programs for Ardupilot?

Hi All !
I have been programming in Assembly and C for microprocessors for many years.
Now, I want to understand what “programming in Lua scripts for Ardupilot” is.
I have a task to make a complex take-off program for my glider.

But I don’t understand how pieces of code that are unclear will help me:

  1. what should a Lua script program look like?
  2. beginning, body of the program, completion?
  3. Syntax of commands and operations?
  4. acceptable variables, functions (full name and list with descriptions)?
  5. examples of programs (at least the simplest ones)?

Lua Scripts — Copter documentation – doesn’t work at all…
Please help me make sense of all this.
Are there any books on Lua?
How does the Lua language itself work (what is provided) inside Ardupilot?
Please help.

1 Like

Well hum actually it works pretty well to me, you should describe your problem if you want the community to help you…

Follow the steps described and it should work.

Now when you will have succeeded making a simple lua script working you have a few places to document :

1 Like

For a LUA primer look here:

1 Like

I figured it out - for some reason I don’t have access to the link…
I will look into the problem with my Internet provider