Hi Bluewave,
Finally I could make it works with your support. Thanks. I made changes in the configuration file as shown in this post.
I summarize what I did if it can help to anybody else :
- I bought the Roadivox buttons from the link.
- I bought the ADS1115.
- I had to add 2 resistors of 1kohm, 0.25W that I had at home. ( I prefered 10k but I had not )
- When you press a button, the resistance between Key 1 and Key 2 and Key GND wires of the box, changes according to the table included in this thread.
- The pullup resistors connected according to the schematic convert the resistance into voltage that is read by the analog to digital converter ADS11x5.
- I meassured the resistances shown in this thread to check. Not needed really.
- If you use other resistor values you have to change the parameters in the config file. You can meassure the voltages you obtain, or calculate with the voltage dividers formula.
- I used the tool provided Ads1115reader to define the max an min values of each button.
- The mapping of the raw voltages obtained and the keystrokes are in the config file. You can change them if you want. Easy. Put a tolerance plus/minus 50 of the value you read
- I entered the values in the config file ( attached ) located in my /home/pi/.openauto/config/openauto_controller_service.ini
- I modified the autostart file to run the controller during the boot process by adding the command "usr/local/bin/controller_service /home/pi/.openauto/config/openauto_controller_service.ini" in the file located in : /etc/xdg/lxsession/LXDE-pi/autostart
And this nice feature worked for me
I hope this helps
Raf
Finally I could make it works with your support. Thanks. I made changes in the configuration file as shown in this post.
I summarize what I did if it can help to anybody else :
- I bought the Roadivox buttons from the link.
- I bought the ADS1115.
- I had to add 2 resistors of 1kohm, 0.25W that I had at home. ( I prefered 10k but I had not )
- When you press a button, the resistance between Key 1 and Key 2 and Key GND wires of the box, changes according to the table included in this thread.
- The pullup resistors connected according to the schematic convert the resistance into voltage that is read by the analog to digital converter ADS11x5.
- I meassured the resistances shown in this thread to check. Not needed really.
- If you use other resistor values you have to change the parameters in the config file. You can meassure the voltages you obtain, or calculate with the voltage dividers formula.
- I used the tool provided Ads1115reader to define the max an min values of each button.
- The mapping of the raw voltages obtained and the keystrokes are in the config file. You can change them if you want. Easy. Put a tolerance plus/minus 50 of the value you read
- I entered the values in the config file ( attached ) located in my /home/pi/.openauto/config/openauto_controller_service.ini
- I modified the autostart file to run the controller during the boot process by adding the command "usr/local/bin/controller_service /home/pi/.openauto/config/openauto_controller_service.ini" in the file located in : /etc/xdg/lxsession/LXDE-pi/autostart
And this nice feature worked for me
I hope this helps
Raf
[Controller]
; Type of the input device
; 1 - Audi MMI 2G panel
; 2 - BMW iDrive Gen 1 controller
; 3 - BMW IBUS
; 4 - Audi RNSE
; 5 - Rotary Encoder
; 6 - GPIO
; 7 - ResistiveButtons
Type=7
; Interface of the ADS11x5 converter
Interface=/dev/i2c-1
[ResistiveButtons]
; Type of the ADS converter
; 0 - ads1105; 1 - ads1115
AdsType=1
; Gain of the ADS converter
; 0 - Twothirds (6.144V); 1 - One (4.096V); 2 - Two (2.048V); 3 - Four (1.024V); 4 - Eight (0.512V); 5 - Sixteen (0.256V)
AdsGain=0
; Sleep duration [ms] after each conversion (read) of the ads11x5 converter
AdsSleepTime=10
; Count of configured buttons
Count=10
; Configuration of first button
; Channel from which value of the button should be read
; 0 - A0; 1 - A1; 2 - A2; 3 - A3
; +
Button_0_Channel=1
Button_0_Min=8500
Button_0_Max=8600
Button_0_Key=F8
; -
Button_1_Channel=1
Button_1_Min=15025
Button_1_Max=15125
Button_1_Key=F7
;<
Button_2_Channel=1
Button_2_Min=16025
Button_2_Max=16125
Button_2_Key=V
;>
Button_3_Channel=1
Button_3_Min=13115
Button_3_Max=13215
Button_3_Key=N
;x
Button_4_Channel=2
Button_4_Min=8450
Button_4_Max=8600
Button_4_Key=Crtl+F11
;GPS
Button_5_Channel=2
Button_5_Min=13110
Button_5_Max=13210
Button_5_Key=Alt+Tab
;Answer
Button_6_Channel=2
Button_6_Min=16680
Button_6_Max=16780
Button_6_Key=p
;Hang
Button_7_Channel=2
Button_7_Min=15025
Button_7_Max=15125
Button_7_Key=o
;Stop
Button_8_Channel=1
Button_8_Min=0
Button_8_Max=100
Button_8_Key=c
;M
Button_9_Channel=2
Button_9_Min=16025
Button_9_Max=16125
Button_9_Key=m