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 Community General Couldn't get GPIO Controller Service to work

    Couldn't get GPIO Controller Service to work
    mark
    Offline

    Junior Member

    Posts: 7
    Threads: 3
    Joined: May 2021
    Reputation: 0
    #1
    06-13-2022, 08:54 PM
    Hello, I'm a bit stumped at the moment. I'm currently trying to map three buttons for scrolling and the enter key for CarPlay. I've tried following the information here:

    https://bluewavestudio.io/community/show...p?tid=2208

    However, I couldn't get it to work. I've tried using GPIO pins 20, 21 and 26 for 1, 2 and Enter keys respectively but nothing is happening when I try to use them. I got rid of my power management HAT which doesn't even use those GPIO pins and it still doesn't work.

    This is how I have the config .ini file set up:
       

    And this is how I have the autostart file set up:
       

    Is there anything here that I've missed out or have done incorrectly? I'm trying not to use a Teensy/Arduino now due to space constraints as I'm mounting this OAP solution on my motorbike.
    BlueWave
    Offline

    Administrator

    Posts: 2,813
    Threads: 64
    Joined: Jun 2019
    Reputation: 71
    #2
    06-13-2022, 09:54 PM
    One instance of the controller_service is always run by default with the .openauto/config/openauto_controller_service.ini. Just remove last line you added to the autostart file.

    Please also post your wiring diagram.
    mark
    Offline

    Junior Member

    Posts: 7
    Threads: 3
    Joined: May 2021
    Reputation: 0
    #3
    06-14-2022, 05:59 AM
    (06-13-2022, 09:54 PM)BlueWave Wrote: One instance of the controller_service is always run by default with the .openauto/config/openauto_controller_service.ini. Just remove last line you added to the autostart file.

    Please also post your wiring diagram.

    I’ll try removing that line later.

    Also I don’t exactly have a wiring diagram but I have been testing the circuit by jumping pin 39 (GND) with pins 37 (GPIO 26), 38 (GPIO 20) and 40 (GPIO 21) of my Pi 3B+.

    And I am now even more confused because I’m not sure which GPIO naming convention this script uses, for example the GPIO by name and BCM GPIO are different!
    Kleekru
    Offline

    Junior Member

    Posts: 13
    Threads: 2
    Joined: Jan 2023
    Reputation: 0
    #4
    09-03-2023, 11:51 PM
    Just so I'm certain, can someone please comment on whether I should be using GPIO pin or BCM pin for GPIO controller service?
    Weagle
    Offline

    Junior Member

    Posts: 5
    Threads: 1
    Joined: Aug 2023
    Reputation: 0
    #5
    09-04-2023, 08:46 PM (This post was last modified: 09-05-2023, 06:20 PM by Weagle.)
    for buttons you don't really need a script to use them, just use dtoverlay gpio keys.

    for each button put the line
    dtoverlay=gpio-key,gpio=your GPIO-Pin,keycode=keyboardcode,label="just any name you prefer",gpio_pull=2
    in your /boot/config.txt.

    keycodes:
    1 = ESC
    2 = 1
    3 = 2
    28 = Enter

    More key codes here: https://github.com/torvalds/linux/blob/m...nt-codes.h

    if its not working try playing around with the "gpio_pull" setting. 0=none 1=pull down 2=pull up

    this won't work with rotary encoders. if you or someone else needs a script for them just message me.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)



    • 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