Page 4 of 4 FirstFirst 1234
Results 31 to 34 of 34

Thread: Wanted URGENT!!! Example 3 digit 7 segment led FSX Link2fs Sketch!!!

  1. #31
    25+ Posting Member
    Join Date
    Jun 2012
    Location
    Canada
    Posts
    34

    Re: Wanted URGENT!!! Example 3 digit 7 segment led FSX Link2fs Sketch!!!

    Did you try this?

    http://www.pjrc.com/teensy/td_libs_Encoder.html

    As for wiring, typically the encoder has three legs the center going to ground and the other two going to the arduino pins. if the encoder has a momentary push button they will be separate and will likely be on the opposite side of the encoder and will act the same as any momentary push button.

    Are you getting an error?

    Krusty

  2. #32
    25+ Posting Member
    Join Date
    Apr 2012
    Location
    New Zealand
    Posts
    35

    Re: Wanted URGENT!!! Example 3 digit 7 segment led FSX Link2fs Sketch!!!

    Quote Originally Posted by Krusty View Post
    Did you try this?

    http://www.pjrc.com/teensy/td_libs_Encoder.html

    As for wiring, typically the encoder has three legs the center going to ground and the other two going to the arduino pins. if the encoder has a momentary push button they will be separate and will likely be on the opposite side of the encoder and will act the same as any momentary push button.

    Are you getting an error?

    Krusty
    Nah no error bruv, just nothing happening when i try to do it in the game, i can make the serial screen do stuff like in the examples, just dunno how to adapt it to the purpose of changeing the alt or heading etc, gonna try copying some of ur code again ...

  3. #33
    25+ Posting Member
    Join Date
    Jun 2012
    Location
    Canada
    Posts
    34

    Re: Wanted URGENT!!! Example 3 digit 7 segment led FSX Link2fs Sketch!!!

    I'm not able to test this example, but figured I'd try and help or atleast get you on the correct path. A very basic example might look something like this.

    Code:
    /* Encoder Library - TwoKnobs Example
     * http://www.pjrc.com/teensy/td_libs_Encoder.html
     *
     * This example code is in the public domain.
     */
    
    #include 
    
    // Change these pin numbers to the pins connected to your encoder.
    //   Best Performance: both pins have interrupt capability
    //   Good Performance: only the first pin has interrupt capability
    //   Low Performance:  neither pin has interrupt capability
    
    
    Encoder knobLeft(5, 6);
    
    //   avoid using pins with LEDs attached
    
    void setup() {
      Serial.begin(115200);
    
    }
    
    long positionLeft  = -999;
    
    void loop() {
      long newLeft;
      newLeft = knobLeft.read();
      if (newLeft != positionLeft) {
        if (newLeft > positionLeft) {
          Serial.print("D050");
          }
        else if (newLeft < positionLeft) {
          Serial.print("D060");
          }
        positionLeft = newLeft;
      }
    }
    Run this using the serial and make sure you see the serial output string each time you turn the knob a "position".

    If all goes well, then from within Link2FS_inOut you will need to program a response to each of these serial strings.

    This is done by clicking the keys button and then the "click here to enter programming mode" button.

    Now enter 05 for pin number and press each key as follows (do not hold them down) "CTRL SHIFT Z -" and then press Save
    Now enter 06 for pin number and press each key as follows (do not hold them down) "CTRL SHIFT Z =" and then press Save

    This should get you changing altitude...

  4. #34
    25+ Posting Member
    Join Date
    Apr 2012
    Location
    New Zealand
    Posts
    35

    Re: Wanted URGENT!!! Example 3 digit 7 segment led FSX Link2fs Sketch!!!

    Haha awesome bro, got the decoder mounted on the MCP and its turning alt up and down and the push button activates it lmao, omg man THIS is what we work towards all this time lol, im so almost there man, cant remember the last time i had a flight when every wakeing thought is dedicated to how to make the AP work without a mouse being involved lol, cant thank you enuff man, between u and jim my dreams are being bought to fruition lol, only thing i see a prob at the mo is that when the alt height gets under 9999 it seems to stop moveing, a few adjustments still needed but have advanced so much this week lol, thnx again krusty bro u rok hard out ...

Page 4 of 4 FirstFirst 1234