Results 1 to 2 of 2
  1. #1
    300+ Forum Addict



    Join Date
    Mar 2009
    Location
    Body in Netherlands, Hart in the Fairest Cape!
    Posts
    387
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Using two outputs to simulate Boeing Vavles with an Open cockpits card(s) and Prosim737

    Where Phidgets have the function to adjust the brightness of LEDS using software, the Open cockpits cards lack it. That is a bit of a bummer when trying to simulate the gauge valve lights.

    But, there is a work around.... for each gauge you need two outputs, on each output a resistod for the led and a diode. The diode ensures that the current from output A does not interfere with output B and the other way around.

    I splashed these together:


    Once wired up I created the following bit of code for each gauge.

    //Define Gauge movement

    var 800 name CowlValveRight, Link IOCARD_OUT, Output 75 {
    if v800 = 2
    {
    v775 = 1
    v776 = 1
    }
    ELSE
    {
    v775 = 1
    v776 = 0
    }
    }

    The Prosim737 software sends either a 1 or a 0 to IOCP to indicate light state (off/on) and a 2 when the output in question is a valve. So I created a var (800) which represents the LED for the valve. Depending on weather a 1 or a 2 is sent the valve light is either dim or bright. You will have to play around with resistors though, Initially the difference between dim and bright was minimal, Now I have other resistors and I will be adding them soon.

    Hope this helps, ... if anyone has any questions, please feel free to ask!

  2. #2
    300+ Forum Addict



    Join Date
    Mar 2009
    Location
    Body in Netherlands, Hart in the Fairest Cape!
    Posts
    387
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Using two outputs to simulate Boeing Vavles with an Open cockpits card(s) and Prosim737

    Just a quick change to the code:

    // Cowl Anti Ice
    var 800 name CowlValveRight, Link IOCARD_OUT, Output 75
    {
    if v800 = 2
    {
    v775 = 1
    v776 = 1
    }
    if v800 = 1
    {
    v775 = 1
    v776 = 0
    }
    if v800 = 0
    {
    v775 = 0
    v776 = 0
    }
    }

    Just making sure that the light is turned off if there is no signal coming through, . it seemed to stay on ofter two cycles of the valve, .. but working perfectly now.

Similar Threads

  1. Open Cockpits USB outputs card.
    By drum4no1 in forum General Builder Questions All Aircraft Types
    Replies: 2
    Last Post: 09-07-2010, 04:49 PM
  2. Open Cockpits Output Card
    By Michael Carter in forum I/O Interfacing Hardware and Software
    Replies: 7
    Last Post: 01-12-2009, 10:26 AM
  3. Open cockpits USB keys card
    By barkay in forum OpenCockpits General Discussion
    Replies: 0
    Last Post: 11-17-2008, 11:45 AM
  4. Open Cockpits FMC/CDU kit
    By Daveanne in forum Computer Hardware Setup
    Replies: 12
    Last Post: 09-25-2008, 03:49 PM
  5. Open Cockpits Display Card.
    By droddis in forum OpenCockpits General Discussion
    Replies: 8
    Last Post: 03-31-2008, 11:15 AM