IO with Arduino and Android

I was some day wondering how to connect IO to Android smartphone or tablet. One well known option is to use IOIO or IOIO-OTG board connected to Android device USB port. The IOIO (pronounced “yo-yo”) is a board specially designed to work with Android devices and robust connectivity to an Android device via a USB or Bluetooth connection and is fully controllable from within an Android application.

I did not want to rush to shop to buy hew hardware, so I was wondering if there were any to use some of my existing Arduino boards for the task. I knew that quite many new Android devices have support for USB_On-The-Go, so I should be able to plug normal USB devices to them with suitable USB-ORG adapter cable. If there would be suitable drivers in Android that supports communicating with Arduino boards, and suitable controlling app, I could do IO with Arduino board.

Some Google searching and searching on Google Play shop revealed that there are quite many Arduino apps for Android. I checked out some, and for controlling Arduino ArduinoCommander app seemed to be most promising. ArduinoCommander app promises to allow controlling Arduino board from your Android device over Bluetooth, Ethernet or USB using WYSIWYG interface, Android sensors or JavaScript script. This looked as a app to test, especially when it was freely downloadable (some advanced functions disabled on free version). In many ways ArduinoCommander app resembled Toolduino control software. ArduinoCommander blog has a short introduction to ArduinoCommander with a video.

ArduinoCommander app uses Firmata protocol to communicate with Arduino board, so should work well with supported Arduino board models that are loaded with StandardFirmata sketch you can find on Arduino IDE examples.

I first needed to get USB-OTG cable so I could connect Arduino to Android smart phone or tablet. Those are easily available from shops. The next thing was to get the application and connect Arduino. I did not have success with my Samsung S4 mini smartphone, the Arduino board did not seem to start up. It turned out that Samsung S4 mini smartphone does not seem to support USB-OTG unless hacked in a ways I did not want to do to my phone.

Fortunately I had other Andoid hardware to test. First I tried an older 7″ Android Tablet from Denver (runs Android 4.0.x). Arduino board powered up nicely. I installed the ArduinoCommander app successfully, but that app did not seem to find the Arduino UNO board connected to USB.

The next test was with newer 9″ Denver tablet. When I connected the Arduino UNO board board, the Arduino board for power and tablet  noticed that it had found a new USB device connected to it. Next task was to install the ArduinoCommander app. The app found the Arduino board connected to USB port, but for some reason first failed to communicate with it. After I had pressed reset button on Arduino board, everything worked well this time. When I tried later, things seems to work well directly and no need to reset. This works well.  ArduinoCommander app free version allows freely to control binary inputs and outputs, but has limitations on support for PWM outputs and analogue inputs. Interesting features that had limited testing time was possibility to check set PWM output with JavaScript core or using data from Android device sensor (I tried sending acceleration sensor data to PWM output controlling LED and it worked).

The next task maybe is to try how the communications works with Bluetooth and Ethernet, so can place the Arduino board where it is needed, and freely carry around the tablet. And maybe work well with a wider selection of devices.

2 Comments

  1. android smart phone says:

    I truly love your website.. Very nice colors & theme. Did you make this website yourself?
    Please reply back as I’m wanting to create my own website and would love to learn where
    you got this from or just what the theme is called.
    Thank you!

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*