1

I am working on a Remote Controller via Headphone jack of iPhone. It requires:

  • In Sending mode, Send signal (19kHz) and signal (10kHz) as 1 and 0 respectively
  • In Learning mode, it receive corresponding signal from other remote controller

I read a site that it introduces AudioUnit (http://cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html) to do tone generation for sending

But How about Learning mode ? How can my application detect 19kHz and 10kHz as 1 and 0 ?

Thanks.

SkyEagle888
  • 1,009
  • 2
  • 18
  • 42

3 Answers3

1

Yes, this idea should work, but 19kHz is probably pushing the limit of the iPhone's recording capabilities. You can find a full comparison of iPhone device frequency responses here. Note that 19kHz falls on the edge of the nyquist frequency, so it's going to have a bit more rolloff. So learning mode would probably be a necessary feature depending on the device family.

Nik Reiman
  • 39,067
  • 29
  • 104
  • 160
0

A simple DSP Goertzel filter will be able to detect those tones at low data rates. For higher data rates, look for FSK demodulation code, perhaps in amateur radio magazines or websites.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
0

You have 2 problem to solve:

  1. How to get audio in
  2. How to detect tone.

First: tone generation sample code sets up audiounit for output, non for input. One way to get input is to use aurioTouch BUT, from my experience, is much simpler to go through SpeakHere sample code. You can find a good idea here http://www.youtube.com/watch?v=bINtRRyblZA Second: to detect tones you can use a pitch detector made by FFT and vDsp (or Goertzel filter but I don't know if you can find already made code in ObjC)

Finally, you can find sample code for input and pitch detection using SpeakHere simply googling. Hope this help

jackdev23
  • 116
  • 4