Results 1 to 7 of 7
  1. #1
    10+ Posting Member
    Join Date
    Jul 2016
    Location
    Stockholm
    Posts
    19
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Using a Encoder as a Rotary Switch possible?

    I just started this projekt to make a own nav/com radio stack.

    I bought these Products to get me started.

    - Pokeys 57e with Ethernet - Got the FSSymphony newest version
    - Leo Bodnars BU0836x solderless joystick 12bit card
    - Arduino Mega 2560 card
    - MICRO DRIVER for 7-segment displays with 5digits from Flightsimparts.eu
    - 7 Segments displays with 8 digits from local store that fits the arduino.
    - Leobodnars Dual Encoder with push btn
    - Leobodnars Encoder 288 with push function


    So i had a vision about building it almost like the saiteks radio but in my own and much higher quality.

    I wanna have the function to swap between the Com1,2, Nav1,2, ADF, DME, XPDR on a encoder, not a switch.
    Is that possible? To turn the encoder so it acts like a rotary switch? And displaying the right selected on one of the 7 segment displays?

    I have tried mobiflight with the dual encoders, encoder, and 2 7 segment displays and it works to program to com 1 and it shows on the display. I can tune the freq kHz and mhz with the correct inne/outer knob.
    Now i just wanna be able to swap to nav or adf and tune the freq using the single encoder to act as a switch.

    Any ideas?

  2. #2
    150+ Forum Groupie


    BushPilotWannabe's Avatar
    Join Date
    Jan 2014
    Location
    Alberta, Canada
    Posts
    176
    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 a Encoder as a Rotary Switch possible?

    http://www.jimspage.co.nz/Multi_Radio.htm Remove references to LCD and replace with 7 segment library and minor changes to the code. Check out posts by Fess_ter and others. Keep us posted on your progress.

    Hugh
    ---CYXD ----- TWR --- GND ------ Closed
    ILS-- NDB -- 119.1 -- 121.9 ---- 11/2013

  3. #3
    10+ Posting Member
    Join Date
    Jul 2016
    Location
    Stockholm
    Posts
    19
    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 a Encoder as a Rotary Switch possible?

    I got it to work with jims code with the LCD and the rotary switch, pretty cool.

    Now i have some ideas.

    - I wanna get rid of the LCD and install 2 7 segment displays ( i think it looks better)
    - I also wanna use my Dual Encoder from Leobodnar bc its amazing for the radio stack. And use a "single" encoder w/push to the AP functions described below
    - I wanna use the second rotary switch on the saitek radio for AP functions as ALT,VS,HDG, CRS, IAS and use one encoder to change those values on another 3rd and maybe a 4th 7 segment display to show them


    This would be so awesome to get it working.. But i would need some help to get me in the right direction.. Im studyin the code now from jim and trying to figure out the logics (im not a programmer)
    I need to figure out how to get the 7 segments to pick up data from the sim, and display them at the right place.
    I need to figure out how to program the second encoder for the AP to function with the second rotary switch that also need to be configured.

    Any ideas or tips is highly welcome =)

    Thanks guys!

  4. #4
    150+ Forum Groupie


    BushPilotWannabe's Avatar
    Join Date
    Jan 2014
    Location
    Alberta, Canada
    Posts
    176
    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 a Encoder as a Rotary Switch possible?

    I don't know about hacking a Saitek Radio Panel but the dual encoder is two single encoders and one pushbutton switch. For the second encoder, double up on Quadrature quad1(8, 9); , and double up on void ROTARYS() between the outermost curly braces. Sort out pin numbers and variable names for the two encoders and then delete 'outer knob' code from quad1 and 'inner knob' code from quad2.

    Converting LCD to 7-segment is much the same procedure. Make small changes at a time and watch for double ==. Everybody gets caught.

    EDIT: I would make two copies of the radio panel sketch. In one, have the existing encoder change only kHz. In the other, make your changes for the outer encoder, changing only the MHz part of the frequency. Put the two together.

    In my haste I forgot about replacing the rotary switch with an encoder. You probably lose the ability to label the 'radio's on the panel around the encoder. The encoder can used to increment or decrement 'active' between 14 and 20 inclusive. Use procedures in void INPUTPINS() and ADF to limit values in 'active'. Keep the progression directional so that Xponder wraps around to Com1 and Com1 wraps anticlockwise to Xponder.

    Hugh
    ---CYXD ----- TWR --- GND ------ Closed
    ILS-- NDB -- 119.1 -- 121.9 ---- 11/2013

  5. #5
    10+ Posting Member
    Join Date
    Jul 2016
    Location
    Stockholm
    Posts
    19
    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 a Encoder as a Rotary Switch possible?

    Thanks for the advice! I will try to sort this out some how.
    Im curious if its possible to borrow the old saitak 7 segments thats on their circuit board... I just need to know where to connect my cables haha =) See pictures ... so hard to try to find the spot for the D in, Clock and latch and volt and gnd..

    https://drive.google.com/open?id=0B4...kZPaFR4LUtLaGM
    https://drive.google.com/open?id=0B4...EpOdmZabGozQ0U
    https://drive.google.com/open?id=0B4...Es1ZlVfRnQ3aUk
    https://drive.google.com/open?id=0B4...zdfa3gtam43UDg

  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: Using a Encoder as a Rotary Switch possible?

    Japmaco,

    I recommend using MAX7219, 7 segment tube display modules.
    Here is my tutorial....
    http://thegeekforge.com/2014/11/tuto...-from-arduino/

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

  7. #7
    10+ Posting Member
    Join Date
    Jul 2016
    Location
    Stockholm
    Posts
    19
    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 a Encoder as a Rotary Switch possible?

    Quote Originally Posted by Fess_ter View Post
    Japmaco,

    I recommend using MAX7219, 7 segment tube display modules.
    Here is my tutorial....
    http://thegeekforge.com/2014/11/tuto...-from-arduino/

    ~Fess
    I tried your code and wired up One encoder n one 7219 8digits.
    Result
    - encoder couldnt do One degress, to fast acc per detent
    - led never even lit up
    - couldnt understand the code.. for ex if i wanted to display the ap heading for example on my first display. Or just the 3 first digits.
    So need to figure that out. In Mobiflight it just Works, simple to pick which display etc. But i wanna minimize numbers of programs used to run my radio stack. So pure code n link2fs is what im aiming for