Need help for a simple code

Hi ! I'm very new to Arduino and i was wondering if someone can help me with this :
I would like to emit a tone ( 1khz if possible ) ( sine if possible, if not square) that it's controlled by a QRD1114 proximity sensor.
I would like the tone increases the closer the sensor.
Thanks !
Adam

Hi ading_27,

Your best starting point is Google, a quick search for 'arduino qrd1114' gives a top entry of 'http://bildr.org/2011/03/various-proximity-sensors-arduino/' that shows how to wire up the sensor and print its result via the serial monitor. From this search for 'arduino tone generator' and see what you find.