01-21-2021, 11:26 PM
Hi,
I must prefix this with, I'm a total noob at this Linux and terminal stuff.
I only got OAP and my pi a few weeks ago, and I have been tinkering with it every day.
So far I have got an auto shutdown script , auto brightness script, backup camera and wireless AA all to work. All thanks to the great info on this forum.
BUT, I can not get my rotary encoder to work. I know that they are supported in V12 of OAP. I would like to use the encoder as a volume knob and the switch as mute. I have tried to follow the instructions on this page https://bluewavestudio.io/community/show...p?tid=2208&pid=12582#pid12582 but I can't seem to get it to work.
I'm using OAP version 12 on a raspi 3b+ the rotary encoder is a KY-040
the encoder is connected to the GPIO as so
sib/clk GPIO 24
sia/dt GPIO 25
sw GPIO 12
+ to 3.3v
gn ground
Also when I ssh into the pi and type DISPLAY=:0 controller_service /home/pi/.openauto/config/openauto_controller_service.ini I get this
[2021-01-21 22:34:27.484367] [0x76f51040] [debug] [OpenAuto] [GpioPinsFactory] allocating pin: 25
[2021-01-21 22:34:27.585038] [0x76f51040] [debug] [OpenAuto] [GpioPinsFactory] allocating pin: 24
[2021-01-21 22:34:27.685735] [0x76f51040] [debug] [OpenAuto] [GpioPinsFactory] allocating pin: 12
[2021-01-21 22:34:27.736188] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 0/10
[2021-01-21 22:34:27.786497] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 1/10
[2021-01-21 22:34:27.846253] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 2/10
[2021-01-21 22:34:27.896531] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 3/10
[2021-01-21 22:34:27.946823] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 4/10
[2021-01-21 22:34:27.997884] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 5/10
[2021-01-21 22:34:28.048172] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 6/10
[2021-01-21 22:34:28.098465] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 7/10
[2021-01-21 22:34:28.148760] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 8/10
[2021-01-21 22:34:28.199055] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 9/10
[2021-01-21 22:34:28.199151] [0x76f51040] [error] [OpenAuto] [GpioPinsFactory] set direction failed, pin: 12
Segmentation fault
I think I'm going wrong in the terminal bit. I don't really understand the instructions given on the thread linked above.
If some could help that would be amazing. Step by step instructions on how to get controller service to work would be great.
I'm also happy to start from a fresh install if all these error codes means I have done something wrong.
I must prefix this with, I'm a total noob at this Linux and terminal stuff.
I only got OAP and my pi a few weeks ago, and I have been tinkering with it every day.
So far I have got an auto shutdown script , auto brightness script, backup camera and wireless AA all to work. All thanks to the great info on this forum.
BUT, I can not get my rotary encoder to work. I know that they are supported in V12 of OAP. I would like to use the encoder as a volume knob and the switch as mute. I have tried to follow the instructions on this page https://bluewavestudio.io/community/show...p?tid=2208&pid=12582#pid12582 but I can't seem to get it to work.
I'm using OAP version 12 on a raspi 3b+ the rotary encoder is a KY-040
the encoder is connected to the GPIO as so
sib/clk GPIO 24
sia/dt GPIO 25
sw GPIO 12
+ to 3.3v
gn ground
Also when I ssh into the pi and type DISPLAY=:0 controller_service /home/pi/.openauto/config/openauto_controller_service.ini I get this
[2021-01-21 22:34:27.484367] [0x76f51040] [debug] [OpenAuto] [GpioPinsFactory] allocating pin: 25
[2021-01-21 22:34:27.585038] [0x76f51040] [debug] [OpenAuto] [GpioPinsFactory] allocating pin: 24
[2021-01-21 22:34:27.685735] [0x76f51040] [debug] [OpenAuto] [GpioPinsFactory] allocating pin: 12
[2021-01-21 22:34:27.736188] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 0/10
[2021-01-21 22:34:27.786497] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 1/10
[2021-01-21 22:34:27.846253] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 2/10
[2021-01-21 22:34:27.896531] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 3/10
[2021-01-21 22:34:27.946823] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 4/10
[2021-01-21 22:34:27.997884] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 5/10
[2021-01-21 22:34:28.048172] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 6/10
[2021-01-21 22:34:28.098465] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 7/10
[2021-01-21 22:34:28.148760] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 8/10
[2021-01-21 22:34:28.199055] [0x76f51040] [error] [OpenAuto] [GpioPin] Unable to set direction, pin: 12, attempts: 9/10
[2021-01-21 22:34:28.199151] [0x76f51040] [error] [OpenAuto] [GpioPinsFactory] set direction failed, pin: 12
Segmentation fault
I think I'm going wrong in the terminal bit. I don't really understand the instructions given on the thread linked above.
If some could help that would be amazing. Step by step instructions on how to get controller service to work would be great.
I'm also happy to start from a fresh install if all these error codes means I have done something wrong.