In most cases you will use a microcontroller such as an Arduino to monitor the signal from the sensor. To do this, connect the ground terminal from the sensor to the GND pin on the Arduino. Connect the 5V wire from the sensor to either the 5V pin or a digital output pin set to HIGH. Then connect the signal wire from the sensor to an analog input pin on the Arduino.
The AnalogRead function measures the voltage of the signal coming from the sensor. When the voltage drops below a set threshold, the Arduino activates the your special effects. Here is an quick example of the code that you could use.
// Example Code
int InputPin = 0; // analog pin 0 is the input pin
int OutputPin = 1; // digital pin 1 is the output pin
int val = 0; // variable to store the value read
void setup()
{
pinMode(OutputPin, OUTPUT); // sets the digital pin as output
}
void loop()
{
digitalWrite(OutputPin, LOW); // sets the output pin initially to LOW
val = analogRead(InputPin); // read the input pin 0 to 1023
if (val < 800) // if sensor value is below threshold set output HIGH
{
digitalWrite(OutputPin, HIGH); // sets output pin HIGH to activate special effects
delay(1000); // waits for a second
}
}