Results 1 to 9 of 9
  1. #1
    75+ Posting Member
    Join Date
    Apr 2014
    Location
    Tampa, FL, USA, Earth..umm
    Posts
    77
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Link2fs v6: How to "push" data to LCD/Arduino upon startup

    I am using a 20 x 4 LCD display with my setup. I was going to go with 7-seg LEDs, but it seemed like it would be cumbersome to work with all those wires(?).

    Right now, my LCD is "tied" into the MCP panel and shows Course, Speed, Heading, Altitude and V/S. And annunciators for CMD-A, VNAV, LNAV, SPD Hold, LOC and APPR (they only display when the button is lit on the MCP).

    A problem I'm having is that when I start the Arduino, I start FSX and then Link2fs v6, the code appears to be sending data "to card" in Link2fs, which also shows up in the Expert -> Extractions list, but the LCD display is not showing the data until I physically move the dial on the aircraft MCP. ie: under my "SPD" heading, it is blank until I manually adjust the speed on the MCP. Similarly, the other numbers on my LCD are blank until I manually adjust the item on the MCP in the aircraft.

    After I adjust the dials from within the aircraft, the LCD appears to update as it should.

    Is there a way to push this information out to the LCD without having to manually turn knobs first? It is a minor inconvenience and won't break the project, but just curious if it was possible.

    BTW, I'm also adding rotaries to the card to adjust the MCP values, radios, etc.

    Thanks!
    Mike

  2. #2
    150+ Forum Groupie BuzziBi's Avatar
    Join Date
    Mar 2013
    Location
    Norway
    Posts
    275
    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 v6: How to "push" data to LCD/Arduino upon startup

    Share your code perhaps?
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  3. #3
    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 v6: How to "push" data to LCD/Arduino upon startup

    Mike you need to narrow down if this is an INO problem or a bug in version 6.

    Run your INO using version 5h (the non expert one) and see if it displays the first "load" of normal data.

    Cheers ,, Jim

    p.s. To explain that ,, there is a delay between connecting to the Arduino and when it can actually process the serial data.
    The data may be being sent to quick after connecting in v6 ???
    Last edited by Jim NZ; 04-19-2014 at 07:03 PM.
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  4. #4
    75+ Posting Member
    Join Date
    Apr 2014
    Location
    Tampa, FL, USA, Earth..umm
    Posts
    77
    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 v6: How to "push" data to LCD/Arduino upon startup

    Thanks Jim. That could explain it (your p.s. section) but I don't know for sure yet. It looks like Link2fs v6 is getting the information in the "To Card" section as I see an entire string/line of data up there. The Arduino appears to re-initialize when I press the button on Link2fs to connect the card. I'll try your suggestion with v5 as a test.

    @BuzziBi - I hope to post the code and images as the project gets more complete. My code is full of test lines and comments right now and wouldn't look too good here. Hehe

  5. #5
    75+ Posting Member
    Join Date
    Apr 2014
    Location
    Tampa, FL, USA, Earth..umm
    Posts
    77
    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 v6: How to "push" data to LCD/Arduino upon startup

    Update: I just tried this with Link2fs v5h with same results. I could only use one of the fields on the display since the others data uses different offsets (a GREAT feature with v6!). The display showed no data from FSX until I manually adjusted a dial (the MCP CRS knob) on the aircraft.

    In my code, at the start of the loop after If (Serial.available()) I have the CodeIn = getChar(); call. And getChar() waits for data from the serial buffer. Is this buffer the string or line shown in the "To Card" section at the top, or is it pausing to wait for some action from FSX or the Arduino card - like a switch press, or some other signal?

  6. #6
    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: Link2fs v6: How to "push" data to LCD/Arduino upon startup

    Make sure the refresh time in link2fs is 10 seconds.
    Sounds like you are only getting updates when you change something.

    ~Fess
    I will only ever be, half the Geek that I wished I was.
    TheGeekForge.Com

  7. #7
    75+ Posting Member
    Join Date
    Apr 2014
    Location
    Tampa, FL, USA, Earth..umm
    Posts
    77
    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 v6: How to "push" data to LCD/Arduino upon startup

    Thanks Fess. Refresh time (Sec) has been 10 and I have tried different cycle times. Baud rate is 115200 in both Link2fs and Arduino. The info is updating only when I change something. When I first start Link2fs, after starting FSX, a line of data comes into Link2fs with the variables I'm extracting and its data - Link2fs sees the data I'm monitoring...it just isn't making it to the card. It like there is a bottleneck somewhere.

    EDIT: I think I found something. Might be related? One of my "case" sections did not have a break; at the end....it went right into the next "case". Have to work today so I'll check it later and report back.

  8. #8
    25+ Posting Member
    Join Date
    Mar 2014
    Location
    France
    Posts
    27
    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 v6: How to "push" data to LCD/Arduino upon startup

    Hello,
    Have you thought to add more serial buffer to your arduino ?
    If not and the first line sent by link2fs is more than 64 characters, there is buffer overflow
    To test without recompiling, just tick only two or three extractions codes in link2fs and see what happens

    To modify serial buffer value, edit "HardwareSerial.cpp"
    in arduino-1.0.5\hardware\arduino\cores\arduino\
    and change the line
    #define SERIAL_BUFFER_SIZE 64
    to
    #define SERIAL_BUFFER_SIZE 256
    of course, need to recompil your code
    may be this help you

    Ryan

  9. #9
    75+ Posting Member
    Join Date
    Apr 2014
    Location
    Tampa, FL, USA, Earth..umm
    Posts
    77
    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 v6: How to "push" data to LCD/Arduino upon startup

    Ryan! That did it! I remember reading somewhere on Jim's pages about the serial buffer mod but did not apply that to my setup until now. It works and it's quick. Thank you!

    Thanks to Jim for his Link2fs work...amazing software and is a big asset to the success of my project, and I'm sure many others. Fess and BuzziBi thanks for jumping in here offering suggestions.

    This particular issue is resolved. Now back to programming the rest of the functions.