One of the easiest ways to transmit data wirelessly is by audio.  Just like with infrared light transmission you must modulate your signal to help identify it from all the other ambient noises that can be present.  Much like the way sonar was used in early TV remote controls.  The noise created can be done so through an ultrasonic speaker and receiver so the actual noises are not heard by human ears (although the dog might go nuts).  This works surprisingly well even up to distances of tens of meters.  Another option is to use a standard speaker and mic and output what is known as 'white noise' or, sound outside the human range of hearing. By no means is this the only or best way to transmit data but it is very easy and can be used to help further understanding of data transfer, i.e. think outside the box.  Obviously a preferred method is to use RF or radio frequency to transmit data since it's range is much greater and no line of site is required, but RF can be complicated and hard to grasp for the beginner and difficult to build with any kind of stability.

    So how do we get started??  Using a micro controller will be the easier way to go in this example.  You can use anything from Basic Stamp, to BasicX or even a PIC.  Modulating your output will help to reduce ambient interference but in this example we will skip this since it adds more code and once you have the basic understanding modulation will be a small step up from this.  Start with building an audio amp to power the speaker, this isn't really necessary unless you are looking for some real transmitting range (In previous projects I have used and old amplifier from a set of amplified computer speakers).  When using a Basic Stamp II  the sound output command is "Freqout" followed by the pin number, duration (in milliseconds), and sound frequency.  An example would look like this.

Freqout 1,500,32000

    This example shows us that Pin1 is our output, the tone will last for 500ms, and the frequency will be 32,000 Hz or 32 KHz.  On the receiver side we need to build and audio preamp to amplify the signal we get from our mic, a band pass filter to clean up the incoming signal, and a threshold detector to give us an on and off (0 and 1) reading on the input of the receiving micro controller.  Once we have this we merely have to look at the input pin that carries the signal from our circuitry and then act accordingly when the input on that pin is high.

    You may notice allot of the stuff and ideas I talk about I don't provide actual circuit schematics or component values, its more like a block diagram.  This is done because experimentation is more important than being able to just assemble something according to instructions.  I hope the subject matter here will help to encourage a basic understanding of electronics and apply that understanding in new ways.  Einstein said "imagination is more important than knowledge" and I think he was right besides, figuring out the details for yourself provides much more satisfaction and pride.  If you have any questions drop me a line.  Some of these circuits are on the schematics page.