Hello guys,
as I said in another thread, I will post my guide for the remote control that I use.
Requirements:
Remote Control:
https://www.amazon.de/gp/product/B07BFW1SDF/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
Arduino Pro Micro:
https://www.amazon.de/gp/product/B07FQJW2KN/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1
or
Arduino Leonardo
I am using an Arduino Pro Micro but an Arduino Leonardo would also work. The Pro Micro is just a miniature version of the Leonardo as it uses the same ATmega32U4. The Pro Micro comes with no presoldered pins, make sure to remember that if you have troubles soldering them.
The remote controls come with a little box. The box itself has 4 wires: 12v, ground, Key 1 and Key 2
Connect 12v and ground to your car. I used the ignition wire so the box shuts off if the ignition is not on but I know many of you use different solutions, I know you know how to handle that.
The other two cables (white and grey in my case) will be connected to the Arduino. I used A0 (grey) and A2 (white cable).
The arduino will act as a translator to press keyboard keys by reading the analog input. Also make sure to connect ground to your arduino so the arduino is able to read the analog voltage.
It should look like this:
My code for the arduino. I'm a beginner in programming with an arduino so be aware that there are better solutions to do this. But my code will also work.
Remember, that if you use a different remote control than mine, you need to edit the code and you will need different values for every pressed key. You can also edit the pressed keys if you would like a different layout. That's up to you.
If you need any help, let me know. Sorry for my english but I hope you understood everything.
If you have an idea how to improve my code, please let me know.
as I said in another thread, I will post my guide for the remote control that I use.
Requirements:
Remote Control:
https://www.amazon.de/gp/product/B07BFW1SDF/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
Arduino Pro Micro:
https://www.amazon.de/gp/product/B07FQJW2KN/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1
or
Arduino Leonardo
I am using an Arduino Pro Micro but an Arduino Leonardo would also work. The Pro Micro is just a miniature version of the Leonardo as it uses the same ATmega32U4. The Pro Micro comes with no presoldered pins, make sure to remember that if you have troubles soldering them.
The remote controls come with a little box. The box itself has 4 wires: 12v, ground, Key 1 and Key 2
Connect 12v and ground to your car. I used the ignition wire so the box shuts off if the ignition is not on but I know many of you use different solutions, I know you know how to handle that.
The other two cables (white and grey in my case) will be connected to the Arduino. I used A0 (grey) and A2 (white cable).
The arduino will act as a translator to press keyboard keys by reading the analog input. Also make sure to connect ground to your arduino so the arduino is able to read the analog voltage.
It should look like this:
My code for the arduino. I'm a beginner in programming with an arduino so be aware that there are better solutions to do this. But my code will also work.
Remember, that if you use a different remote control than mine, you need to edit the code and you will need different values for every pressed key. You can also edit the pressed keys if you would like a different layout. That's up to you.
#include <Keyboard.h>
char F8Key = KEY_F8;
char F7Key = KEY_F7;
int pressed = 0;
//
void setup() {
// put your setup code here, to run once:
Keyboard.begin();
}
void loop() {
// put your main code here, to run repeatedly:
int sensorValue = analogRead(A0); //grau
int sensorValue2 = analogRead(A2); //weiß
if (sensorValue < 780 && sensorValue2 < 780) {
delay(100);
// Fernbedienung 1
// GPS
if (sensorValue > 570 && sensorValue < 620 && pressed == 0) {
Keyboard.print('f');
pressed = 1;
}
// Telefon annehmen
if (sensorValue > 400 && sensorValue < 440 && pressed == 0) {
Keyboard.print('p');
pressed = 1;
}
//
// Telefon auflegen
if (sensorValue2 > 520 && sensorValue2 < 555 && pressed == 0) {
Keyboard.print('o');
pressed = 1;
}
// Quadrat
if (sensorValue > 455 && sensorValue < 490 && pressed == 0) {
Keyboard.print('j');
pressed = 1;
}
// M
if (sensorValue > 350 && sensorValue < 380 && pressed == 0) {
Keyboard.print('M');
pressed = 1;
}
// Fernbedienung 2
// +
if (sensorValue2 > 290 && sensorValue2 < 320 && pressed == 0) {
Keyboard.press(F8Key);
delay(100);
Keyboard.releaseAll();
pressed = 1;
}
// -
if (sensorValue2 > 180 && sensorValue2 < 215 && pressed == 0) {
Keyboard.press(F7Key);
delay(100);
Keyboard.releaseAll();
pressed = 1;
}
// <
if (sensorValue2 > 125 && sensorValue2 < 150 && pressed == 0) {
Keyboard.print('v');
pressed = 1;
}
// >
if (sensorValue > 240 && sensorValue < 270 && pressed == 0) {
Keyboard.print('n');
pressed = 1;
}
// Mute
if (sensorValue2 > 80 && sensorValue2 < 90 && pressed == 0) {
Keyboard.print('b');
pressed = 1;
}
}
if (sensorValue > 750 && sensorValue < 850 && sensorValue2 > 750 && sensorValue2 < 850) {
pressed = 0;
}
}
If you need any help, let me know. Sorry for my english but I hope you understood everything.
If you have an idea how to improve my code, please let me know.