1

I am new to arduino, and based on my search, it is possible to connect Android devices and Arduino board thru bluetooth module. But most solutions i found are either for controlling Arduino board using an Android app, or controlling Android app using Arduino board.

My question is, is there a way to control/interact with the Android OS on the phone using Arduino, thru whatever connection?

I am asking this because I am thinking of building a portable keyboard or touchscreen device for Android devices, and want to see if Arduino is a good platform for prototype.

5
  • 1
    What do you mean "thru whatever connection"?
    – gre_gor
    Mar 21, 2018 at 22:34
  • Whatever = TCP/IP?
    – MatsK
    Mar 22, 2018 at 5:41
  • @gre_gor so can be bluetooth, usb, wifi, wifi direct, etc.
    – Yulong
    Mar 23, 2018 at 2:16
  • @MatsK that can work, but i guess it is part of wifi or cellular connection?
    – Yulong
    Mar 23, 2018 at 2:16
  • There is wifi and cellular add-ons to Arduino that can have a TCP/IP stack and thereby you can have a program that is agnostic to what coimmunication layer you have.
    – MatsK
    Mar 23, 2018 at 14:18

1 Answer 1

2

What you've seen is most usually a bluetooth module which has a "virtual COM port" service -- you connect to the bluetooth module and you can then send a data stream up and down through this COM port, just like you are able to do with a normal Serial port.

If you want a bluetooth keyboard:

What you want for seamless integration is a bluetooth module which natively exposes a "HID" (Human Interface Device) profile. Keyboard, mice and gamepads are examples of an HID.

There is a multitude of projects which use Arduino + Bluetooth HID module:

When you are a beginner you should buy the more expensive modules which don't require you to do any firmware hacking. Adafruit's product might work for you. As the description page says, you can connect a microcontroller's UART TX to the modules RX pin to send arbitrary keystrokes. You can then add a keyboard matrix, or lots of buttons, or whatever you desire to that microcontroller to make it trigger the keypresses you want.

This should get you started on your own research.

2
  • super detailed thanks! what about touchscreen device, is that considered as HID too?
    – Yulong
    Mar 23, 2018 at 2:18
  • I have never seen remote touchscreens or displays on Android. I am not sure if it is possible to connect a new screen to an Android wirelessly. Mar 23, 2018 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.