Digistump Forums
The Digispark => Digispark (Original) Support => Topic started by: shanko07 on March 21, 2013, 05:28:02 am
-
Hi All,
I'm an engineering student working on a free time project right now with the digispark model A. I like the capabilities of the chip and I'm already playing around with it to control some LEDs and various things I've got in my dorm. What I'd really like to do though is to interface it with a spare android phone I've got laying around.
As of this post I've been able to plug the device in and detect it using some free android apps and an OTG cable I've hacked together from a normal cable. This, however is the point where my USB skills and also my Android knowledge fall quite short. If anyone has experience setting up the USB connection with the digispark on Android please point me in the right direction.
I should mention the phone is a droid bionic, which supposedly might support OTG? That would be a good question to answer as well though.
-
So far the best way to interface with the Digispark over USB on the host side has been libusb - which looks like it has some ports to Android and might be a good start. There is example c++ and python code available for talking to the Digispark with it and some c# code here on the forum. But there isn't anything premade so far for Android.
In theory anything that could talk USB HID should work. So something like these answers might get you on the right path as well, using the example code for the Digispark to know what to set things to and how to talk to it: http://stackoverflow.com/questions/13280581/using-android-to-communicate-with-a-usb-hid-device
If you make an attempt at it please keep us posted - this would be really cool!