Free hook up phone no cc

19 Jan

For the following application to work, you will require an Android device that supports USB host mode as well as the USB host API.During USB initialization, the Arduino USB serial converter is set up and after that, communication is done using the bulk IN endpoint of the very same serial converter.With both the aforementioned firmware installed your Arduino board and the Android application installed on your phone or tablet, you will be able to control the brightness of the Arduino Uno’s built-in LED with a slider on your Android device.However, this could be easily implemented with a few lines of additional code.For developing this example we have used a Galaxy Nexus Phone with an USB-OTG adapter cable.

The most interesting section is in the class Usb Controller where the Arduino device is set up and communication is initiated.

So let’s have a closer look at the inner class Usb Runnable within Usb Controller: The first call sets the control line state, the second call sets the line encoding (9600, 8N1).

After submission, the thread will go into “wait” again.

This way, even if submission takes more time than expected, the Activity’s main thread will not be blocked and hence the app will not become unresponsive.

In this post we’ll put everything together and show you how to communicate between your Android application and the Arduino using nothing but the Android USB host API.

Remember, this approach has nothing to do with Android ADK!

This opens up an entire range of new possibilities for already existing hardware as well as newly designed hardware for phones.