0

So I am teaching this programming class and ran into a little problem. I was originally going to teach serial communication between Raspberry Pi and arduino with python, but my RPi died suddenly. Oh well... but i came up with the idea of teaching serial com btw arduino and android with a USB OTG adapter.

Brilliant idea but the catch is, ive never programmed with android too extensively. I know the basics, i just need to know how to pass simple ascii characters through serial com. Ive looked on the web, but none of the existing tutorials that ive seen really accomplish this.

Sorry for the needy long post but i would really appreciate any help i can get on the subject.

(On a side note does anyone know a good Android IDE for beginners?)

Ignatius_Gim
  • 582
  • 2
  • 5
  • 21
  • Do you have a device with an actual serial port on Android? USB isn't really quite the same thing- data is sent serially, but there's a lot more overhead and things like plug and play sent over it. – Gabe Sechan Jun 26 '14 at 02:03
  • @Gabe Senchan Yes i do, Galaxy S3 has serial capability. – Ignatius_Gim Jun 26 '14 at 09:50
  • Here are some sources from Prof Google: http://android.serverbox.ch/?p=549, http://garretlabs.wordpress.com/2014/05/09/arduino-and-android-devices-the-not-so-well-known-usb-connection/, http://stackoverflow.com/questions/14662069/arduino-android-usb-connection. Eclipse might be good because it is so common. I am not familiar with any other IDEs. – Gravitoid Jun 26 '14 at 14:02
  • @Gravitoid Not exactly what i was looking for, i am looking for USB OTG not arduino host shield, but its an option ill consider – Ignatius_Gim Jun 26 '14 at 17:09
  • How about this: https://github.com/mik3y/usb-serial-for-android. You might try checking on the arduino forums/sites to see if someone there has a solution. HTH! – Gravitoid Jun 26 '14 at 18:37
  • @Gravitoid Perfect. I tested it and works almost perfectly. Had to fiddle with a couple things but that is great!! Thanks a lot – Ignatius_Gim Jun 26 '14 at 19:04
  • Glad that worked out. I made an answer so you have something to accept :). – Gravitoid Jun 26 '14 at 20:27

2 Answers2

1

Here is a site that has source for Android USB to various devices: usb-serial-for-android.

From the description:

This is a driver library for communication with Arduinos and other USB 
serial hardware on Android, using the Android USB Host API available on 
Android 3.1+.
Gravitoid
  • 1,294
  • 1
  • 20
  • 20
0

Please check the link and go through the redirected website.You found the answer for serial communication tutorials go for here and here

dEePU
  • 195
  • 5
  • 18