Jump to content
The simFlight Network Forums

Search the Community

Showing results for tags 'arduino'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Product Support Forums
    • FSUIPC Support Pete Dowson Modules
    • MyTraffic Support Forum
    • FeelThere Support Forums
    • FS Commander Support Forum
    • Flying W Simulation
    • AConstable Traffic Sounds Support Forum
    • Fabio Merlo Products Support Forum
    • Elite-Air Studio Support Forum
    • Nikola Jovanovic Support Forum
    • Intrasystems Support Forum
    • FScene Support Forum
    • Taburet & DanVFR Support Forum
    • Environ Scenery
  • simFlight DE
  • FS MAGAZIN (DE)
  • simRussia
  • FSUIPC Client DLL for .NET

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. Hi, I searched the forum before I post and I saw that someone tried to communicate the Lua script and Arduino. We're sharing the same purposes. Let me say the problem I deal: For PMDG 737, I can control any button, switch in the simulation by sending data from Arduino to Lua script. Also, I have no problem to send data from Lua script to Arduino by using Lvar list in FSUIPC documents. However, I can't read the state of any warning light as Overheat Lights in the overhead panel. Only need to know, what should be the way of reading the state of lights in PMDG 737. If there is a small example or showing a way to go, I will be grateful 🙂
  2. Hello, let me start by thanking Pete for his great work! :-) I am trying to replace the use of link2fs with lua-scripts. link2fs is great and it works but it seems to be no longer supported and while it finally seems to work with P3D V4 again, sooner or later it might cause problems. With the help of fess' and other examples online, I've written the following short script to adjust the QNH. I have verified using the link2fs traffic monitor that the arduino really sends "C25" and "C26" with linefeeds. The "Arduino_Data"-function also gets called, whenever I turn the rotary encoder. But that is as good as it gets. :-/ When I turn the rotary encoder slowly, nothing further happens. No datastring gets shown, nothing happens to the QNH. With the addition of the 50ms ipc.sleep before the datastring is read, the ipc.controls get executed when I turn the rotary encoder fast enough. (I assume that this happens when the com port buffer holds two Cxx-commands, because the datastring-readout that is shown in these case reads "C25C2", so one character is missing. When I am giving out the string length 'n', it is either 0, 5, 10 or 15. Something seems to quantize the datastring to multiples of 5. When I turn other encoders however, whose command is longer (e.g. "Y010"), n is 0, 6, 12, ... I've run out of ideas where the error might be and I'd be thankful for every suggetion where to look. Kind regards from Munich, Frank -------------------------------------------------------- --- VARIABLE INIT -------------------------------------- feet_per_meter = 3.28083989501312 port_number = "3" -- Change Port Number for your Arduino speed = 115200 handshake = 0 serial_wait = 20 -------------------------------------------------------- --- SERIAL COMMUNICATION INIT -------------------------- SwitchPanel_Com_Port = com.open("COM"..port_number, speed, handshake) if SwitchPanel_Com_Port == 0 then ipc.display("Could not open Switch Panel at Com Port"..port_number,5) --ipc.exit() else ipc.display("Switch Panel connected at Com Port "..port_number,5) end ipc.display("SwitchPanel script loaded", 10) -- TEMP -------------------------------------------------------- --- INPUTS --------------------------------------------- -------------------------------------------------------- function Arduino_Data(SwitchPanel_Com_Port, datastring, length) -- the code always gets here ipc.sleep(50) datastring = com.read(SwitchPanel_Com_Port,50,1) ipc.lineDisplay(datastring,-32) -- TEMP if (string.find(datastring, "C25")) then -- Increase QNH ipc.control(65883,0) end if (string.find(datastring, "C26")) then -- Decrease QNH ipc.control(65884,0) end --ipc.sleep(serial_wait) -- needed??? end -------------------------------------------------------- --- OUTPUTS -------------------------------------------- -------------------------------------------------------- function call_xpndr (offset, value) value = string.format("%04x", value) --ipc.display(value) com.write (Arduino_Com_Port, "=J"..value) end -------------------------------------------------------- --- EVENTS --------------------------------------------- -------------------------------------------------------- event.com(SwitchPanel_Com_Port, 50,1, "Arduino_Data") event.offset (0x0354, "UW", "call_xpndr") -- transponder
×

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.