Project showcase
Cockroach Laser Killer

Cockroach Laser Killer © GPL3+

Kill this terrifying bug at any distance with a laser ray! (Or dream about it...)

  • 7,883 views
  • 4 comments
  • 12 respects

Components and supplies

Apps and online services

About this project

If you feel terrified about cockroaches...

You problem is now solved with " Cockroach Laser Killer!

No more embarrassing excuses to run off from them!

Or dream about it...

Video

Okay...this is a simple LDR and Servo interaction. Geta laser pen and "shoot" at the target. LDR activates a servo motor to drop your target down. 3 seconds later it goes up again for another shot.

The main issue is to set the correct threshold of the LDR sensor and avoid unwanted movements due to light conditions.

Code

Cockroach Laser KillerArduino
/*
Project - Interaction LDR x Servo
 */
#include <Servo.h>

Servo servo1;  // Servo object

int pinServo = 2;    // variable to store the servo position
int triggerPoint = 970; //trigger point to start servo
byte sensor = A0; 
int sensorValue;

void setup() {
  pinMode(pinServo, OUTPUT);
  servo1.attach(pinServo);  // attaches the servo pin  
  servo1.write(155);// tell servo to go to "up" position
  delay(200);
  pinMode(sensor, INPUT);
}

void loop() {
  sensorValue = analogRead(sensor);
    if (sensorValue > triggerPoint){
    servo1.write(75); // tell servo to go to "down" position
    delay(3000);
    servo1.write(155);
    delay(200);
    }
}//End loop

Schematics

Project Schematics
Bkscheme njfny7eg38

Comments

Similar projects you might like

Laser Measurements Controlled by Arduino Nano

Project in progress by Ingo Lohs

  • 3,322 views
  • 2 comments
  • 5 respects

Arduino Laser Tripwire

Project tutorial by Ian Cumming

  • 14,612 views
  • 9 comments
  • 47 respects

RCar | Robots for All!

Project tutorial by Luís Rita

  • 5,831 views
  • 1 comment
  • 40 respects

Morse Code Communication Using Laser Module (Both)

Project tutorial by SURYATEJA

  • 988 views
  • 1 comment
  • 9 respects

Leap Motion Laser Tanks!

Project tutorial by Sean McCormick

  • 8,605 views
  • 5 comments
  • 47 respects

The Troll Switch

Project tutorial by Aitor Gamarra

  • 1,159 views
  • 2 comments
  • 2 respects
Add projectSign up / Login