I've never used Arduino but I know a few of its utilities.

I want to input audio from a Jack cable (analog) and be able to send it via Bluetooth, or Wi-Fi, or USB to an Android Phone and being able to print the values (from 0 to 1).

I'm looking for tutorials but I just find the way to make the input but not the output.

Which one would you recommend me of Bluetooth, Wi-Fi and USB?


  • 2
    I followed your requirement right to the point when you said you wanted to print values then I got baffled. Are you saying you want your android to act as an oscilloscope screen? You also don't mind (it seems) if it's a radio link or a wired link (USB) so maybe it also doesn't matter if the audio is already on the phone or it is fed to the phone via the microphone or a line-input connection?
    – Andy aka
    Jun 6 '14 at 17:33
  • And yes I would prefer radio link instead wired :)
    – Rafa Firenze
    Jun 6 '14 at 17:46
  • There is an upper-limit to the sampling rate of the Arduino; this is something you need to be aware of. Arduino provides a convenient interface to the user but at a cost of flexibility. You may need to look into programming the microcontroller directly. Also, see en.wikipedia.org/wiki/Nyquist_frequency.
    – sherrellbc
    Jun 6 '14 at 18:05
  • Yes but maybe I'm using MIDI, then I wouldn't have problems on sampling Jun 6 '14 at 19:12
  • Maybe I would like to know the compontents to be used and I will learn on my own :) Jun 6 '14 at 19:19

The simplest solution: it really depends. There are a couple of things to consider:

  • Bluetooth would probably be the least professional to impliment. The easiest way to do this is with an app. You can impliment it into your application with this:

    Let your own Android application receive data from Arduino by listening to the "primavera.arduino.intent.action.DATA_RECEIVED" intent. This intent will contain the "primavera.arduino.intent.extra.DATA" byte array with the received data. Call getByteArrayExtra("primavera.arduino.intent.extra.DATA") to retrieve the data. Send data to Arduino from your application by broadcasting an intent with action "primavera.arduino.intent.action.SEND_DATA". Add the data to be sent as byte array extra "primavera.arduino.intent.extra.DATA".

    Still, that's pretty unprofessional IMHO. There are probably other ways to do this, but Arduino Uno Communicator is the easiest by far that I've seen. The main advantage of Bluetooth is it works without a router and it's very cheap (as far as wireless). I can't remember if it's the HC4 or HC5 chip that is commonly available, but [one of those] can be picked up for around $6. Just connect via serial and issue AT commands.

  • WiFi would be the most professional. First of all, people hear Wifi and they think Ohh! Shiny! I'm going to buy it! That's just what I've observed in the past, but it may not always be true. WiFi can be done with the TL-WR703N router. This blog post outlines how you can even connect it directly to the Arduino. You can also use an ethernet shield (or equivalence, I've seen breakout ethernet boards built for ~$5). Either way, it's a great way to add 5V WiFi to your Arduino. The only disadvantage is cost and it only works if you're near a WiFi router. If those aren't disadvantages, go ahead with WiFi; it's a great product.
  • USB is only useful if you want:

    • Speed
    • Stability
    • Portability (i.e. no WiFi Router)

    Speed can be eliminated as a need if you only send data every 300 ms or so, depending on what you're doing. For WiFi, it might be best to only go to a webpage when an even occurs (i.e. button pushed on Arduino). Bluetooth and WiFi are stable enough if you're over short distances (and you couldn't go a long way with wires, anyway), and there's not too much interference (don't try at a football game with 50K cell phones... granted, they will be on different bands if using cell service, but Bluetooth may be on).

    As far as portability, for the price of an OTG cable for your phone, you'd be better off buying a Bluetooth module for a dollar extra.

Suggestion: go with WiFi unless you need the portability. Consider figuring out WPS so your users can connect to WiFi with a push of a button. I don't know if the TL-WR703N has support for WPS, via serial or not.

Forgot to mention: I don't know everything about your app, but WiFi might have too much latency/overhead for near-instant response. As far as wireless, Bluetooth would have much lower latency AFAIK. (As you can tell, there's no perfect solution here :-))

  • Exactly I was interested in latency rates ;). Sorry for not reveal my project, it's kinda game with "music" (not guitar hero, please :D) Thank you very much, ;) Jun 7 '14 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.