Android devices become incredible cheap (especially those with android v1.6). I'm considering to use one as a brain of autonomous robot. Unfortunately I didn't find any info on that.
I would like to connect two external USB-webcams and some DIY-selfmade USB ADC & output-ports converter to steer the wheels and read analog distance sensors. If I choose some cheap netbook than they usually already have 3 usb ports. But if I will be forced to use a tablet, then it requires also an usb hub.
As an update for your information: Based on answers I assume that android device will be too expensive in comparison to effort. I will go for cheap atom netbook with standard linux & arduinio USB device for controls & sensors. At cost of half kg (one pound) heavier device I will save months on learning & development.
You need an android device that either supports usb host mode out of the box (a few of the cheap tablets apparently do) or a phone that can do so with custom usb power wiring and perhaps a new kernel driver (as many phones can).
You will likely need root.
The api would be the normal linux USB stack, including just about any C-coded source-available device driver available for a desktop linux (excepting those that use bits of x86 binary windows drivers run in a compatibility wrapper).
You could interact with that either from the ndk using normal methods (device files, read/write/ioctl) or with careful driver design so things really look like files you can probably get at some of it from java or at the very least java with some thin ndk wrappers around device file operations.
Essentially, this isn't an "android" question, it's a question about the capabilities of a particular android device's hardware, how to get root on that device, and then it becomes a standard embedded linux question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With