V
V
Vitaly2016-01-20 15:17:41
Android
Vitaly, 2016-01-20 15:17:41

How to control Android using Arduino?

There is a CarPC project to install an Android tablet in a car. Making a convenient touch interface is not a problem, the catch is connecting the mechanical buttons of the car to the tablet so that when pressed, certain applications are launched (navigation, phone, music control from the steering wheel, etc.). The idea came to connect the buttons through arduino, but since. I'm new to this and have difficulty writing code. I know that arduino and android can communicate two-way through Amarino, but I didn’t find an example when arduino controls android, and not vice versa (unless arduino sends a print message).
Is the above possible? Can you share a code example where a button is pressed on the arduino and it sends a command via bluetooth or USB to open some application on the tablet?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
O
Oleg Nerwin, 2016-01-20
@Nerwin

you can emulate a hid keyboard on an arduino, connect via otg, the main functions (volume, music) will work

R
RedApe, 2016-01-20
@RedApe

IMHO, a special application on the tablet should periodically poll the arduino, and when it receives a command, perform the necessary actions.

A
Alexander Volkov, 2016-01-20
@a_volkov1987

With the same commands for receiving and transmitting via UART, arduino can also communicate via bluetooth with android.
Scan buttons using arduino, determine their pressing and releasing, and send messages to android upon detection of these events.

M
Max, 2016-01-20
@MaxDukov

Why not use OBD? Or is it a task to do all this strictly for carbureted cars? Take a BT OBD adapter -> make friends with your tablet -> have the codes of the buttons pressed.

B
BJM, 2018-10-22
@BJM

Since you are talking about the buttons on the steering wheel, then we are talking about the existing buttons in the interior of the car.
By pressing the CAN button, the module generates a packet and you intercept it. Yes, even an arduino with a CAN module (although a gateway specialized for your purposes will be more reliable). Next, the arduina, which emulates hid, generates a button press. And how you will process pressing in Android - decide based on the tasks.
Oops, I wrote and I see that it smells like necroposting. Has your project progressed since then?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question