Resident Evil (2002) - Laser Trap
seen from Tunisia

seen from United States

seen from Türkiye
seen from China
seen from China
seen from United States
seen from United States
seen from United States
seen from United States

seen from Russia
seen from United States
seen from United States
seen from United States
seen from United States
seen from Brazil
seen from Mexico
seen from Türkiye
seen from China
seen from United States

seen from United States
Resident Evil (2002) - Laser Trap

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Arduino Laser Trip Wire with Auto Ambient Light Calibration
I am still waiting for my LCD screens and IR sensors to turn up, so in the meantime I built a laser trip wire that auto calibrates the trip thresholds after (x) seconds or after being tripped.
The code runs for the first time and creates a running average of the ambient light via the light sensor. This average will be higher if you point a laser at it like I have in the photo.
Every (x) seconds (10 seconds in the code below) it calculates the current average for ambient light via a rolling average. When the light sensor is tripped, it resets the array and calculates the average from scratch.
The LED on pin 13 shows when the trap is active (HIGH) and can be tripped. When the LED is LOW, the auto-calibration is occurring or the trap is in a wait state (3 seconds in code) to prevent multiple triggers..
Update: Fixed an error in the following diagram.
/************************************************************************************ * * Name : Laser trip wire with auto-recalibration sketch * Author : Brock Cremer * Updated : August 14, 2014 * Version : 0.1 * Notes : * URL : http://timecircuit.tumblr.com * ***********************************************************************************/ const int numReadings = 10; // number of readings to calculate average in averageAnalog() int readings[numReadings]; // the readings from the analog input in averageAnalog() int index = 0; // the index of the current reading in averageAnalog() int total = 0; // the running total in averageAnalog() int average = 0; // the average in averageAnalog() int inputPin = A0; // analog input pin int delayAfterTrigger = 3000; // wait period after being triggered unsigned long interval=10000; // the time we need to wait unsigned long previousMillis=0; // millis() returns an unsigned long. void setup() { // initialize serial communication with computer: Serial.begin(9600); // initialize all the readings to 0: for (int thisReading = 0; thisReading < numReadings; thisReading++) readings[thisReading] = 0; // use LED pin 13 to show when trigger is active pinMode(13, OUTPUT); digitalWrite(13, HIGH); for (int i = 0; i < numReadings; i++) { averageAnalog(); } Serial.println("Initilisation Complete..."); Serial.print("\r\n"); } void loop() { // Nothing will change until millis() increments by 10000 // Read ambient and calculate average light if ((unsigned long)(millis() - previousMillis) >= interval) { previousMillis = millis(); averageAnalog(); digitalWrite(13, HIGH); } if(analogRead(inputPin) < average * 0.8) { Serial.print("Triggered at: "); Serial.print(millis()); Serial.print("\r\n"); Serial.println("Waiting..."); digitalWrite(13, LOW); delay(delayAfterTrigger); // delay in between reads to prevent multiple triggers for (int i = 0; i < numReadings; i++) { averageAnalog(); } digitalWrite(13, HIGH); Serial.println("Trigger Ready..."); Serial.print("\r\n"); } } int averageAnalog() { // turn the LED on pin 13 off to show that the average is being calculated digitalWrite(13, LOW); // subtract the last reading: total= total - readings[index]; // read from the sensor: readings[index] = analogRead(inputPin); // add the reading to the total: total= total + readings[index]; // advance to the next position in the array: index = index + 1; // if we're at the end of the array... if (index >= numReadings) // ...wrap around to the beginning: index = 0; // calculate the average: average = total / numReadings; // send it to the computer as ASCII digits delay(1); // delay in between reads for stability return average; }
And here is the output serial monitor.
Initilisation Complete... Triggered at: 68177 Waiting... Trigger Ready... Triggered at: 72412 Waiting... Trigger Ready...