3

I am connecting my Arduino to my Cubieboard that is running Android.

I tested this originally with my android tablet and USB cable. This worked successfully for the most part using the firmata kit but I don't want to use firmata.

I want a basic function library written in Java for use with Unity (eg Library Tutorial Video) to connect to the Arduino via the USB serial port connection much like a connection with my Windows computer.

I'd like basic command functions like:

  • Connect / Open
  • Write
  • Read
  • Flush
  • Close

I was thinking maybe of using this library here but I am unsure how to go about this. I know similar discussion have already taken place on the forum claiming it may not be possible, but it is very clear that it is. It has been done many times. All I need to do is send strings with serial after finding the Arduino's COM port and reading from the serial.

Anonymous Penguin
  • 6,365
  • 10
  • 34
  • 62
ValrikRobot
  • 843
  • 2
  • 8
  • 6

2 Answers2

2

Using the library you linked should be a simple case of downloading the library's jar file from https://github.com/mik3y/usb-serial-for-android/releases and adding it as a reference/library/dependency (I forget what eclipse calls them) in your eclipse project.

Then of course providing you connect with the right baud rates and so on it should work.

m3z
  • 330
  • 2
  • 9
0

Totally insane thought here but.....

Have you tried writing a chrome App to talk to your Arduino?

I did it on the Mac - had chrome monitoring things happening on the network and sending Serial Commands to the Arduino over USB.

You can find samples in the Chrome samples / docs

https://developer.chrome.com/apps/serial