(edit)
Here is the Qprox QT113 data sheet
And some simple code, remember that this works exactly the same as any switch!!!
Attach:Qprox.txt