Share My Creation Android Arduino Comms - USB Host

Westy53

Member
Licensed User


The attached file demonstrates USB Host Communication directly between an Android machine and an Arduino. It uses a service application called Arduino Uno Communicator created by Mat Jeppsson. This is currently available free from Google Play. (Java source is also available - see ReadMe file in attached .zip for details.)

The B4A app I have written, uses the BroadCastReceiver, Phone and ByteConverter libraries so you will need to download these also, if you don't have them already. My thanks to those who contributed these.

The app "Android-Arduino_Blink" allows you to turn ON/OFF a flashing LED on pin 13 of the Arduino from your Android system. An Arduino program file is included in the .zip.

Unfortunately the Communicator app does not work with every Uno and Mega that is out there! I suggest that you download Arduino Uno Communicator first and if it works with your kit, the b4A code should work too!

The files are here:View attachment AA_Blink.zip

I hope this helps some of the people interested in this topic.

Westy53
 

Attachments

Beja

Expert
Licensed User
Thanks for sharing..

I have a dream, one day, this B4A includes (Out, Port, Data), and (Inp, Port).
like in the old (good) days of BASIC.
At least through bluetooth.
 

skywalker34

Member
Licensed User
Thank you for sharing

this is working great on my samsung tablet GT-P7510

the only pb was that UNO board usb is "high power" and can't be powered by the tablet itself
So, I have first to add power on the arduino board with wall socket
and then have to launch arduino communicator.

Now this is a good basis to drive electronics hardware and sensors from our android phone or tablet :sign0060:

sky
 

lip

Active Member
Licensed User
Ftdi



The attached file demonstrates USB Host Communication directly between an Android machine and an Arduino. It uses a service application called Arduino Uno Communicator created by Mat Jeppsson. This is currently available free from Google Play. (Java source is also available - see ReadMe file in attached .zip for details.)

The B4A app I have written, uses the BroadCastReceiver, Phone and ByteConverter libraries so you will need to download these also, if you don't have them already. My thanks to those who contributed these.

The app "Android-Arduino_Blink" allows you to turn ON/OFF a flashing LED on pin 13 of the Arduino from your Android system. An Arduino program file is included in the .zip.

Unfortunately the Communicator app does not work with every Uno and Mega that is out there! I suggest that you download Arduino Uno Communicator first and if it works with your kit, the b4A code should work too!

The files are here:View attachment 14807

I hope this helps some of the people interested in this topic.

Westy53
Would this enable me to use non rooted Android device as host and connect to a device with FT232 Chip?
 

bluedude

Well-Known Member
Licensed User
Other cool USB devices

Hi,

Have you ever taken a look at a company called Yocto?

USB Sensors

These guys have pretty need USB sensor stuff and they have an Android library. Maybe someone is interested to write a B4A library for their stuff.

Cheers,
 

agraham

Expert
Licensed User
A Yocto library looks to be relatively easy to implement as Yocto provide the Android source code, including the USB driver, as an Eclipse Java project. The main obstacle is that their API is huge as there is a different class for each product and each has loads of methods. I guess the individual product support could be implemented incrementally as individual basic4android libraries as and when required unlike their solution which compiles it all in one big library.
 

CharlesR

Member
Licensed User
Would this enable me to use non rooted Android device as host and connect to a device with FT232 Chip?
Hi

I have followed all of the instructions and have the communicator running with my uno board but when I run your B4A program all of the buttons are greyed out. Do you have any suggestions?

Thanks

Charles
 

Westy53

Member
Licensed User
Hi,

Have you started the service from the menu in the top right hand corner of your screen?

This should enable the 'ON' button and hopefully allow you to get things working.

Regards
 

CharlesR

Member
Licensed User
Hi,

Have you started the service from the menu in the top right hand corner of your screen?

This should enable the 'ON' button and hopefully allow you to get things working.

Regards
I have got it going now thanks. I don't know what was wrong but it seems a great program.

Thanks for the help.

Charles
 
Top