Showing posts with label bluetooth. Show all posts
Showing posts with label bluetooth. Show all posts

Wednesday, December 14, 2011

Android USB Host Testing.


Since Android 3.1.x (API Level 12), Google introduced an USBManager which is actually a USB host API to talk to usb devices connected to your tablet or phone. It is different to the Android ADK, which requires the other sides have special hardwares and software protocol.

As now your tablet/phone is a complete USB host device, so you can theoretically connect to any USB devices avaliable on the market. But you have to write your own USB driver using USBManager (Java) to talk to the devices.

There is a one example provided by Google called ADB Test, so now you can connect your tablet/phone to another android devices via USB and start debugging. (i.e. adb logcat)

Source code: http://developer.android.com/resources/samples/USB/AdbTest/index.html

I got a Asus Transformer TF101, and a special USB kit which turns the external connector to a USB host connector, so now I can connect my phone to it with the USB cable! Let's see the demo video here:


If you want try it on your tablet/phone, you need to prepare a special usb host adapter if necessary and then download the following from the market:
https://market.android.com/details?id=com.bitartist.usbadb

it is a direct copy of the Google Adb Test,  I put on market just for people to play around.

I have started a little project of interfacing a USB2Serial adapter (based on SiLabs CP210x chipset), so far I can send / receive the data to/from the MCU UART. I hope can finish some basic functions (like setting baud rates) and release it to public later. It is a simple and cheap way to connect your Android devices to your MCU, the only drawback is that you will need a usb host and Android 3.1.x host device.





Monday, November 1, 2010

Android Controlled Robot.

It is a cool project by Radu Motisan, he made a robot and control remotely with his Android Phone via Bluetooth. Source codes for both Android (bluetooth control) & ATmega are available on his website!


Demo here:



Project site here:
http://www.pocketmagic.net/?p=1398

Monday, September 13, 2010

Android controlled wireless lamp.

Previously, we discussed about bluetooth module used with Android Nexus One, so today, we would like to present our latest project here "Android controlled wireless lamp", We want to do somethings meaningful with the bluetooth module with Android, so we modify a small lamp and adding the bluetooth connectivity to it.

Sometimes, we may put the phone in bedroom, and we will not know someone is calling. With the bluetooth connectivity, it can communicate with your Android phone at least 10 meters or above. You can put the lamp near your TV or anywhere you stay. Also, you can use Android as a remote control to turn on/off the lamp (or any devices).

Hareware: AVRtiny2313, Bluetooth module, lamp


Ready to go:


Video Demo:

Wednesday, May 19, 2010

Android & Bluetooth module.




Android phone is becoming more popular, most of the android phones equipped with Bluetooth. Just wonder how we can make use of the powerful android phone to interact with MCU like Atmel AVR, PIC or even Arduino. I think that more interesting projects can be done with the bluetooth connectivity to Android:)

After some studies, I found out that in Android 2.0, Google enhanced the Bluetooth API and come with an Bluetooth Chat sample for communicating devices with RFCOMM (SPP profile). So I did a try and it really works very well!



Let's try it out! The Bluetooth module that I used is a very tiny one with PCB antenna, it can control device over 10 meters at least, good enough for small project:) It is programmed to use as RFCOMM, so it can act as a wireless UART, good fit for all the MCU! With only 4 wires, 3.3v/Gnd/Tx/Rx, no programming needed, you can directly connect the module to your MCU UART.


Here is my demonstration video:


For the bluetooth sample code, you can find it in the Android SDK or here.