Project showcase
Cockroach Laser Killer

Cockroach Laser Killer © GPL3+

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

  • 14,847 views
  • 4 comments
  • 16 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

Wirlesse Laser Data Transmission(LIFI) (100b/second)

Project tutorial by Ahmed Ramzi Houalef

  • 3,520 views
  • 10 comments
  • 6 respects

Laser guidance using Joystick

Project showcase by Shubham Santosh

  • 4,957 views
  • 1 comment
  • 21 respects

Magnet Levitation with Arduino

Project tutorial by jsirgado

  • 117,770 views
  • 129 comments
  • 286 respects

Laser Measurements Controlled by Arduino Nano

Project in progress by Ingo Lohs

  • 8,048 views
  • 3 comments
  • 6 respects

U I O - The Ultrasonic Interactive Owl

Project showcase by NerdFatherRJ

  • 4,634 views
  • 4 comments
  • 22 respects

DIY Arduino Laser Pointer Shooting Game

Project tutorial by Mirko Pavleski

  • 1,766 views
  • 1 comment
  • 3 respects
Add projectSign up / Login