• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Using a Android smartphone as a GUI for Arduino

Guillaume

Lurker
Hello everyone, I'm new to android development.

I would like to know if it would be possible to use an Android phone just for only one custom app.

My idea is to use a low cost smartphone ( < 70€ ) just for a GUI for my Arduino-controlled aquarium, so that I could see temperatures, change settings of my Arduino program, etc... Possibly I could put a SIM card in it so that my app could send SMS to my real smartphone to inform me of problems with the aquarium... whatever! I plan to use this to communicate with my arduino: https://github.com/mik3y/usb-serial-for-android


I would like that when I start the phone, it doesn't show the main menu and icons. Instead I would like that the phone directly start on my custom app. And changing the behavior of the Menu/Return buttons, so that the user (me) would not be able to get out of this app.

So, for now, as I'm a complete beginner with Android, I'm just asking to you experts, if it is at least possible to do that. There is no point that I waste my time if it isn't even possible to achieve what I want. And if it is, some tips and how-to's would be very welcome :)

Thank you in advance.
 
Its possible, but you would need a phone with USB OTG support. You also need to check that your phones kernel includes modules for the USB serial adapter you pick.

I tried something similar in the past, but I had problems because Android seems to power down the USB stack when the screen goes off. This caused my USB hardware to stop working correctly.

It might also be worth looking at the IOIO board instead: https://www.sparkfun.com/products/retired/10748
 
Hello,

Are you sure that I need a smartphone with USB OTG support ? There isn't a single word about it on the website in my link. Also I have tried by using Bluetooth Serial to communicate my actual smartphone to/from the arduino (with a little BT board HC-05), it works quite well.

Thank you.
 
If you want to use a USB serial dongle then you will need OTG support and an OTG adapter cable so you can connect a full sized USB-A plug in to your phone. Older phones are only capable of running in peripheral mode. OTG devices can switch between peripheral and host modes depending on what they are connected to.

Most devices made in the last couple of years will have OTG support, although not the nexus 4 (listed as not compatible on the website you linked to).

The IOIO board gets around the problem by acting as the USB host, so you phone can work in peripheral mode.
 
Back
Top Bottom