Welcome to Cockpitbuilders.com. Please login or sign up.

April 17, 2024, 06:38:45 PM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
77 Guests, 0 Users
Members
  • Total Members: 4,154
  • Latest: xyligo
Stats
  • Total Posts: 59,640
  • Total Topics: 7,853
  • Online today: 96
  • Online ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 0
Guests: 77
Total: 77

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

FSUIPC LUA SCRIPT FOR ARDUINO

Started by Trevor Hale, February 16, 2015, 10:36:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Trevor Hale

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
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

Trevor Hale

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.
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate