Results 1 to 8 of 8
  1. #1
    New Member
    Join Date
    Jul 2012
    Location
    New Jersey
    Posts
    2
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Link2fs_inOut Gear Light Question

    Hello,

    I am trying to create a gear setup with lights and a gear switch. I have the switch working, but I was wondering how I would go about the lights. I was hoping to create something similar to the link2fs for the Uno that Jim had created, but I like the customization that the link2fs inOut provides. I assume I would have to modify the PDE? Unfortunately my experience with C is not much right now.

    Thanks,
    Tom

  2. #2
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    May 2012
    Location
    SC, USA
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Link2fs_inOut Gear Light Question

    Tom,

    Part of the answer depends on how you plan to wire the lights and the voltage power demand of the lights... for the purposes of an example... assume you are using a 9V or a 12V light as an indicator. Wire the light as you normally would to be able to switch it on and off... rather than a mechanical switch, install an NPN transistor (costs like 10 cents) with the base wired to one of your arduino pins as an output... initally set low, with a pull down resistor.... When 5V is not pressent, no current will flow from the collector to the emittor... when you set the ardino pin high, current will flow from the collector to the emittor and your light will turn on... just like switch and switched from your arduino... pull the pin low, the light goes back off, current stops....

    Not sure if this is over simplifying your question... If I missed it, just clarify...

    As far as modifying the PDE... yes, you would have to assign a pin number for your output... and then add code to decide when to pull the pin high or low... very simple stuff...
    Don't know a thing....
    Making slow progress at www.erj145.com

  3. #3
    New Member
    Join Date
    Jul 2012
    Location
    New Jersey
    Posts
    2
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Link2fs_inOut Gear Light Question

    Thanks for the quick response,

    I've set up the wiring, but I have an issue with the code.

    Here is what I have

    if (j1 == 'I'){
    delay (11);
    gearc = char(Serial.read());
    if (gearc == 100){
    digitalWrite(ledpinc, HIGH);

    I have no issues compiling or anything, but I do have an issue getting a result. If I just apply 5 volts, and bypass the PWM, I get the light to light up, so I know the circuit should be good. The Code above is also all in the void loop, and I have an int ledpinc assigned to the PWM and the void setup has " pinMode(ledpinc, OUTPUT);". Hopefully this can help. I've made some of the code based off some other code for similar stuff for arduino.

    Thanks,
    Tom

  4. #4
    500+ This must be a daytime job Jim NZ's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    764
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Link2fs_inOut Gear Light Question

    Hi Tom and welcome aboard.

    Have you had a look at the starter packs ,, especially "Starter2.pde" which is available here ,,,
    http://www.jimspage.co.nz/starterpde.htm
    The Starter2 does all the gear indications and it will help you sort it out.

    Note though ,,, it's code is for the Arduino IDE version 0022 so you will have to compile it using that version or 0023.
    I haven't yet got on to updating all my PDE's. for the new version 1

    Good luck ,,, Jim
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  5. #5
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    May 2012
    Location
    SC, USA
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Link2fs_inOut Gear Light Question

    Tom,

    Also, if you could post more of your code, that might help sort it out... difficult to tell from just a snipit...
    Don't know a thing....
    Making slow progress at www.erj145.com

  6. #6
    New Member
    Join Date
    Sep 2012
    Location
    weston, FL
    Posts
    3
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Link2fs_inOut Gear Light Question

    Has any body used bicolor LED's for landing gear indication? I would like to use Red and Green bicolor LED's and have them switch for green to red when the landing gear are moving. has anybody tried this?

  7. #7
    10+ Posting Member
    Join Date
    Sep 2010
    Location
    USA
    Posts
    23
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Link2fs_inOut Gear Light Question

    Quote Originally Posted by gvmdcg View Post
    Has any body used bicolor LED's for landing gear indication? I would like to use Red and Green bicolor LED's and have them switch for green to red when the landing gear are moving. has anybody tried this?
    This what I do in my sim. Bicolor LEDs. Works great. However, I use a PIC to interface to the com port rather than an Arduino. I use a software implemented com port on the PIC side and then, currently, high-side drive the LEDs with just resistor between the cathode and ground. No transistor needed.

    I am expanding my little PIC board to have 64 outputs each expandable to 16 addressable boards. That's more than 1000 outputs. That's alot of outputs! I just sent the PCB out for fabrication and should have it back next week. I use the PIC because I know the design and can quickly change the relationships across the outputs. For example, my autopilot pushbuttons "illuminate" when active and my PIC drives these LEDs. The outputs will be all "sinks" on my new PCB so I can easily design anything to turn on from from LEDs to motors. This should cover anything I need to ever "output" again.

    You may find that bicolor LEDs have different percieved intensities so the current limiting resistor will likely be different for the red and the green LED depending on your preferences.

  8. #8
    New Member
    Join Date
    Sep 2012
    Location
    weston, FL
    Posts
    3
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Smile Re: Link2fs_inOut Gear Light Question

    Quote Originally Posted by pilotgil View Post
    This what I do in my sim. Bicolor LEDs. Works great. However, I use a PIC to interface to the com port rather than an Arduino. I use a software implemented com port on the PIC side and then, currently, high-side drive the LEDs with just resistor between the cathode and ground. No transistor needed.

    I am expanding my little PIC board to have 64 outputs each expandable to 16 addressable boards. That's more than 1000 outputs. That's alot of outputs! I just sent the PCB out for fabrication and should have it back next week. I use the PIC because I know the design and can quickly change the relationships across the outputs. For example, my autopilot pushbuttons "illuminate" when active and my PIC drives these LEDs. The outputs will be all "sinks" on my new PCB so I can easily design anything to turn on from from LEDs to motors. This should cover anything I need to ever "output" again.

    You may find that bicolor LEDs have different percieved intensities so the current limiting resistor will likely be different for the red and the green LED depending on your preferences.
    Thanks Pilotgil for you comments. I an a newbe to interfacing with FSX. I purchased my first ardunio two weeks ago. I stumbled on Jim NZ web site and quickly went to work setting up my card to work with FSX. I have no experience with code but having fun playing with this stuff. I set up landing gear LED's using bicolor to have lights switch for red (unsafe) to green (Safe). i have the green working but not the red and i am not sure how to set this up to work.