Project tutorial
Arduino Centipede Dropping Prank

Arduino Centipede Dropping Prank

Scare infiltrators of your room!

  • 921 views
  • 4 comments
  • 5 respects

Components and supplies

Necessary tools and machines

glue
09507 01
Soldering iron (generic)

About this project

Protect your room with a centipede dropper! Anyone who enters will have a centipede dropped on them!

It's a very simple machine, but can give a good scare. A cup holds the centipede, a servo motor flips the cup to drop the centipede, and a distance sensor senses if the door is opened. If the distance is less than a certain amount, the arduino turns the cup 180 degrees. After a second, it returns to its previous position, with the cup facing upwards. The machine will be dormant for five seconds, making sure the cup doesn't keep dropping centipedes. I glued the distance sensor to the bottom of the cup so it takes minimal space.

To use it, just flip the switch to turn the device on. Place the toy centipede in the cup. Then, wait for invaders.

Code

Centipede DropperC/C++
#include <Servo.h>
int trigPin = 5;    // Trigger
int echoPin = 3;    // Echo
Servo myservo;
long duration;
 
void setup() {
  //Serial Port begin
  Serial.begin (9600);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  myservo.attach(20);
  myservo.write(180);
}
 
void loop() {
  digitalWrite(trigPin, LOW);
  delayMicroseconds(5);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
 
  duration = pulseIn(echoPin, HIGH);
  Serial.println(duration);

  if ((duration <= 2000) and (duration != 0)){
    myservo.write(0);
    delay(1000);
    myservo.write(180);
    delay(5000);
  }
  

  

}

Schematics

Centipede Dropper
Centipede dropper nhxlwwnzin

Comments

Similar projects you might like

Dropping Spider on Doorbell - Halloween Scare Prank

Project tutorial by Kristian Blåsol

  • 3,688 views
  • 1 comment
  • 11 respects

3D-Printed Prank Vibrating Cup

Project tutorial by Alex Wulff

  • 4,746 views
  • 2 comments
  • 20 respects

Prank Your Friends with Talking Darth Vader

Project tutorial by Tharindu Liyanage

  • 3,220 views
  • 3 comments
  • 10 respects

Simple Door Prank with Arduino 1Sheeld

Project tutorial by Zowail

  • 1,796 views
  • 0 comments
  • 7 respects

PIR Sensor Activated Halloween Scare Prank

Project tutorial by Kristian Blåsol

  • 8,124 views
  • 8 comments
  • 23 respects

Cool Arduino Prank with Circuito.io

Project tutorial by Robin Kanattu Thomas

  • 1,081 views
  • 0 comments
  • 15 respects
Add projectSign up / Login