Cockpitbuilders.com

Arduino Projects => Sketches - => Topic started by: Trevor Hale on February 16, 2015, 10:36:28 AM

Title: FSUIPC LUA SCRIPT FOR ARDUINO
Post by: Trevor Hale on February 16, 2015, 10:36:28 AM
Gents,

Please find attached my working files for the .lua script to output values to the Arduino through "COM3"

I have included my Arduino Sketch also so you can compare the values being sent to the Arduno from the LUA Script.  This will control 6 Gauges.

1. Trim
2. OAT
3. VSI
4. FLAPS
5. Fuel Left
6. Fuel Right

There is still a little issue with the LUA Script, whereby a couple of the values (Namely VSI AND FUEL LEVELS) Zero before updating.

I haven't yet figured out how to do this, but if you find a way to fix it, please feel free to ammend the script and post it back here.

This is not 100% My script, Please understand I just edited it to suit my needs.

In any case, dump the .lua script in your modules directory and it just works when FSUIPC is ready.

Best regards,

Trev
Title: Re: FSUIPC LUA SCRIPT FOR ARDUINO
Post by: Trevor Hale on February 17, 2015, 03:14:13 PM
I thought I should also mention I am running a PCA9685 PWM card on my Arduino with 16 PWM Channels that I control the servos with.