Results 1 to 2 of 2
  1. #1
    75+ Posting Member



    Join Date
    Mar 2009
    Location
    boston ma
    Posts
    109
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    newbie in need of direction

    Hello all
    So as the title reads i am new to the arduino boards and the link2fs software (awesome by the way thank you Jim). Im trying to grasp the concept
    of how the two communicate arduino code to link2fs to fsx. If someone could post a very basic sketch as to how a toggle switch would turn on the
    landing lights say. Now i can code the arduino part no problem.
    int switchPin = 8;
    int ledPin = 10;

    void setup()
    {
    pinMode(switchPin, INPUT);
    pinMode(ledPin, OUTPUT);
    }

    void loop()
    {
    if (digitalRead(switchPin) == HIGH)
    {
    digitalWrite(ledPin, HIGH);
    }
    else
    {
    digitalWrite(ledPin, LOW);
    }
    }

    Basically its just a switch that turns on an led. question is is how would this code read if i wanted the switch to turn on the landing lights
    in fsx and also light an led. and what needs to be done in the link2fs software.
    I think if i see an example i will be able to figure out a little more. Unfortunatley the examples in the link2fs have a lot going on so its tough
    to pinpoint a specific something so simply.
    sorry if this is jibberish. Like i said im new, lol
    Thanks

  2. #2
    150+ Forum Groupie
    Join Date
    Nov 2013
    Location
    Evansville, Indiana
    Posts
    243
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: newbie in need of direction

    Look at the landing gear light sample ino.
    Wire it up.
    It's just 3 leds that show gear down and locked. You dont even have to do all 3, just do the nose gear.
    It only deals with output to the arduino, but it's your first step and you need it.

    It will demonstrate how to pitch to the arduino and catch it.

    After you succeed with that, you can learn how to toss info back to link2fs from arduino.
    I will only ever be, half the Geek that I wished I was.
    TheGeekForge.Com