Thanks for the response. I've got an arduino board that has serial output via 4 pins.
Pin 1: ground Pin 2: transmit Pin 3: Receive Pin 4: reset I plug a usb adapter into it and that allows me to upload code to the microprocessor and monitor the output locally. To answer your question: -I'm looking to replace the arduino completely with a program running on the phone that somehow, someway generates a simple serial message 'as if' it were being transmitted via that simple pin configuration. (We're using a video overlay board that accepts serial data and creates a real time GPS text overlay for the students to watch locally and analyze later.) -Thanks for the advice. We've been using this Arduino for years now and I think it's time to replace it completely with Android. --It's a fun challenge. Josh On Mar 11, 1:17 am, Bob Kerns <r...@acm.org> wrote: > I'm not clear on what you're trying to do. Are you trying to get a > phone to talk to an Arduino, or are you trying to replace the Arduino > with a phone? > > Phone USB ports aren't generally set up to act as hosts, but as > devices. Supposedly some phone USB ports are hardware capable of doing > so, but I don't know the magic, nor do I recall which phones. That may > not be a barrier; you may be able to set the Arduino up as host. > > At a minimum, you'll need to get root access on your phone, and > probably need to use the NDK to write some C++ code to bridge between > Java and actually talking to the hardware. > > I've got a couple different types of Arduinos around here with USB -- > one with it on the board, another, smaller one with it as an adapter > you can connect to the output pins. I don't know if that solves any > problems for you -- but at least the adapter would save you from > dealing with the electrical interface aspects, and the USB bus > protocol aspects. The latter would probably render your plan > unfeasible, I think. I note that the USB adapter board has a tiny > surface-mount chip on it that has about as many pins as the Arduino > chip! > > The USB adapter wasn't very expensive. I could dig up the specific > parts and sources, but you're probably better off googling and > choosing what best fits your needs. > > On Mar 10, 7:11 pm, joshbeck <josh.beck2...@gmail.com> wrote: > > > > > I've got a fairly unique situation: > > -I'm a teacher with a magnet school that focuses on rocketry and > > technology. > > -I've got a rocket payload that has a video overlay board which > > does the following: > > -Takes input from a camera. > > -Takes input from a serial data line. > > -Overlays the text input to the video screen in > > real time and saves to avi. > > > -Right now we're using this antiquated device called an Arduino > > board which > > is cave man stuff compared to the developer phones we have on > > campus. > > (It's very educational making one work, but still old hardware.) > > > -The Arduino processor essentially outputs data to a 'transmit' > > pin that can > > be easily hooked up to a pc serial port. (Serial Data.) > > > -My present course of inquiry: (I'm a fairly proficient Android > > developer) > > > -------------------------------------- > > -Can I write a program that outputs a simple string like > > this directly to the usb data cable: > > String aString = "abc"; > > --------------------------------------- > > -From there, would it be possible to purchase a usb > > to serial converter and > > grab the associated data off the correct serial pin? > > > -I'm not an electrical engineer by any means, but I think that a > > serial > > converter would have to boost the voltage from the USB line > > in order to work because usb voltages are lower than what > > comes straight out the serial port. > > -Does this sound like a correct assumption? > > > -Any advice is appreciated. We'd love to launch a smart phone at > > our next competition. > > > Thanks in advance > > Josh Beck > > Northeast ISD > > KSAT/iMAK at Krueger Middle School > > (Launching Android in rockets is fun!) -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en