Press on pressure sensor once, turn on LED for 6 seconds I am working on a project where I would like to press on a pressure sensor (0-1024) once and turn on the LED and turn off by itself after 6 seconds. I am quite new to arduino and I can't seem to understand how to code this with using a pressure sensor as a switch rather than an actual switch. Any ideas?
Sensors which give a range of outputs need to have their outputs processed using a technique called hysteresis.  That is, normally, the turn on threshold is higher then the turn off threshold.  

For example, the thermostat in your home uses hysteresis when controlling your HVAC system.  Otherwise your thermostat would constantly be turning on and off your HVAC system likely causing an early failure.

Here is a stackexchange Arduino question about hysteresis.