07 IR sensor + Recorder

Dscn0408

I set three functions for different range of distance as fallowing:
1.about 50-80cm: Play
2.about 15-50cm: Play and fwd
3.about under 15cm: Play and change volume

Here’s the video where I use three leds to test if the code works first.

http://vimeo.com/moogaloop.swf?clip_id=2156376&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1
LED + IR from Hsiang Ju Hung on Vimeo.

The left led is Play, the middle one is Fwd, and the right one is Vol.
So, it works fine with pin high and low/led on and off.
And here is the code.Download ir_recorder.rtf

Then I put the connectors  to the recorder.
Here is what happen on level 1 and 2.

http://vimeo.com/moogaloop.swf?clip_id=2156723&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1
Level First to Second from Hsiang Ju Hung on Vimeo.

Level 3, which will keep changing volume on the same sound file if you stay longer.

http://vimeo.com/moogaloop.swf?clip_id=2156675&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1
Level Third: keeps changing volume from Hsiang Ju Hung on Vimeo.