BlueWave Studio forum
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:
  • Home
  • Help
  • View Today's Post
  • More
    • BlueWave Studio
    • Shop
User Links
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:

    Quick Links Home Help View Today's Post
    More
    • BlueWave Studio
    • Shop
    BlueWave Studio forum Hardware for head-unit Other Hardware Rotary encoder for navigating through menu

    Rotary encoder for navigating through menu
    marcb4
    Offline

    Member

    Posts: 64
    Threads: 4
    Joined: Mar 2019
    Reputation: 8
    #1
    11-25-2020, 11:37 PM (This post was last modified: 11-25-2020, 11:38 PM by marcb4.)
    Hi!

    I just upgraded my OAP with 2 rotary encoders, one for volume control and one for media control and everything is working as expected and I wanted to use another rotary encoder to navigate around the menu. Kind of like the BMW knob that you support but I can't manage to get it to work. "Enter" or "Ent" is not recognized as KeyPress (kinda makes sense because its not a button like V or N or whatever). Also 1 and 2 somehow won't work.

    Am I doing something wrong or are these buttons not supported? Could you help me out?

    I tested it with these different configs:
    I only post one so there is no wall of text and of course I didn't put any "/" in the real .ini file. I just use them to illustrate which values I tried it with

    [Controller]
    Type=5
    
    [RotaryEncoder]
    SiaPinNumber=5 / 05
    SibPinNumber=6 / 06
    SwPinNumber=13
    LeftKeyStrokes=1 / Left / Left arrow
    RightKeyStrokes=2 / Right / Right arrow
    SwitchKeyStrokes=Enter / Ent



    Volume and media knobs are working fine and it's an amazing feature!!
    BlueWave
    Offline

    Administrator

    Posts: 2,783
    Threads: 64
    Joined: Jun 2019
    Reputation: 70
    #2
    11-26-2020, 07:38 AM (This post was last modified: 11-26-2020, 07:49 AM by BlueWave.)
    In X11 Enter key is named Return.

    [Controller]
    Type=5
    
    [RotaryEncoder]
    SiaPinNumber=5
    SibPinNumber=6
    SwPinNumber=13
    LeftKeyStrokes=1
    RightKeyStrokes=2
    SwitchKeyStrokes=Return

    If you are testing Controller Service via SSH, you have to use the DISPLAY prefix to point which display should receive key strokes, e.g.

    Quote:DISPLAY=:0 controller_service /home/pi/.openauto/config/openauto_controller_service.ini

    Also please remember that in config file you have to provide GPIO number, not the Raspberry PI pin number. We tested above config in our reference setup (we used different pin numbers) and everything works as expected.
    marcb4
    Offline

    Member

    Posts: 64
    Threads: 4
    Joined: Mar 2019
    Reputation: 8
    #3
    11-26-2020, 07:45 AM
    (11-26-2020, 07:38 AM)BlueWave Wrote: In X11 Enter key is named Return.

    [Controller]
    Type=5
    
    [RotaryEncoder]
    SiaPinNumber=5
    SibPinNumber=6
    SwPinNumber=13
    LeftKeyStrokes=1
    RightKeyStrokes=2
    SwitchKeyStrokes=Return

    It's working! Thank you!
    lemuertdmamt
    Offline

    Junior Member

    Posts: 18
    Threads: 5
    Joined: Mar 2020
    Reputation: 1
    #4
    02-08-2021, 09:13 PM
    (11-25-2020, 11:37 PM)marcb4 Wrote: Hi!

    I just upgraded my OAP with 2 rotary encoders, one for volume control and one for media control and everything is working as expected and I wanted to use another rotary encoder to navigate around the menu. Kind of like the BMW knob that you support but I can't manage to get it to work. "Enter" or "Ent" is not recognized as KeyPress (kinda makes sense because its not a button like V or N or whatever). Also 1 and 2 somehow won't work.

    Am I doing something wrong or are these buttons not supported? Could you help me out?

    I tested it with these different configs:
    I only post one so there is no wall of text and of course I didn't put any "/" in the real .ini file. I just use them to illustrate which values I tried it with

    [Controller]
    Type=5
    
    [RotaryEncoder]
    SiaPinNumber=5 / 05
    SibPinNumber=6 / 06
    SwPinNumber=13
    LeftKeyStrokes=1 / Left / Left arrow
    RightKeyStrokes=2 / Right / Right arrow
    SwitchKeyStrokes=Enter / Ent



    Volume and media knobs are working fine and it's an amazing feature!!

    Hi, can you kindly explain how to setup more than one rotary encoder? Is it possible to use gpio and rotary encoder input? Thanks
    BlueWave
    Offline

    Administrator

    Posts: 2,783
    Threads: 64
    Joined: Jun 2019
    Reputation: 70
    #5
    02-08-2021, 10:02 PM
    Please have a look here https://bluewavestudio.io/community/show...p?tid=2208
    lemuertdmamt
    Offline

    Junior Member

    Posts: 18
    Threads: 5
    Joined: Mar 2020
    Reputation: 1
    #6
    02-09-2021, 10:51 AM
    Thanks for the answer. I have already read this thread but it's not really clear to me. I understand that 2 different types of systems can’t be used together but more than one of the same type yes. Right? If yes, can you make me a code example to setup 2 rotary encoders together? It would be helpful to me to understand how to do it. Thanks in advance
    BlueWave
    Offline

    Administrator

    Posts: 2,783
    Threads: 64
    Joined: Jun 2019
    Reputation: 70
    #7
    02-09-2021, 01:08 PM
    You just need to run two instances of controller_service.
    Kruss
    Offline

    Junior Member

    Posts: 36
    Threads: 6
    Joined: Oct 2018
    Reputation: 0
    #8
    02-20-2021, 06:29 PM
    Hi sorry but for IT dont Work. What you mean with two instances? ....contr.. Service...1. Ini and ....contr.. Service...2. Ini and so on? Please give me an example. I want to use 2 encoder too. Thanks
    BlueWave
    Offline

    Administrator

    Posts: 2,783
    Threads: 64
    Joined: Jun 2019
    Reputation: 70
    #9
    02-20-2021, 06:36 PM
    Everything is described in this thread https://bluewavestudio.io/community/show...p?tid=2208. Use /etc/xdg/lxsession/LXDE-pi/autostart file to run another instance of controller_service.
    Kruss
    Offline

    Junior Member

    Posts: 36
    Threads: 6
    Joined: Oct 2018
    Reputation: 0
    #10
    02-20-2021, 06:51 PM
    I read it more Times. But i dont understand it. Please give me a Tip. Did i have to create more Controller. Inis? Sorry
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)

    Pages ({1}): 1 2 Next »



    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Help · BlueWave Studio · Shop

    Copyright © bluewavestudio.io. All rights reserved.

    Linear Mode
    Threaded Mode