Project tutorial
Build a "Go Away!" Robot - Easy Starter Project for Kids

Build a "Go Away!" Robot - Easy Starter Project for Kids © GPL3+

Somebody trying to steal your stuff? Make a simple robot that will detect when they get too close and make a loud noise to scare them off!

  • 2,631 views
  • 6 comments
  • 12 respects

Components and supplies

About this project

We wired up the board using the following sketch:

We used a Styrofoam wig head, hollowed out the back and poked some holes through it for various connections:

This video shows how we put it all together:

Update: Someone in the comments asked about how to make the body of the robot so I made this video to show how you can make one yourself!

Code

Buzzer and LED Activated by Distance SensorArduino
Distance is in centimeters.
#define trigPin 13
#define echoPin 12
#define buzzer 9 //buzzer to arduino pin 9
#define led 11



void setup()
{ Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
  pinMode(buzzer, OUTPUT); // Set buzzer - pin 9 as an output
  pinMode(led, OUTPUT);
}

void loop()
{ long duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;

 if (distance < 100)

{ tone(buzzer, 98); // Send 1KHz sound signal...
digitalWrite(led,HIGH);
}

else {
noTone(buzzer);
digitalWrite(led,LOW);
}

Serial.print(distance);
Serial.println(" cm");
delay(500);
}

Schematics

"Go Away!" Robot Diagram
A sketch, breadboard view of our set up for the Arduino and components.
Go away robot sketch bb yc8jiwa0bv

Comments

Similar projects you might like

Super Easy to Build 1Sheeld 2 Wheel Drive Robot

Project tutorial by Ahmed Hamdy and Garry Gerwer

  • 20,317 views
  • 3 comments
  • 35 respects

Otto DIY build your own robot in one hour!

Project tutorial by Camilo Parra Palacio

  • 137,224 views
  • 136 comments
  • 374 respects

Otto DIY+ Arduino Bluetooth robot easy to 3D Print

Project tutorial by Team Otto builders

  • 75,238 views
  • 135 comments
  • 217 respects

MeArm Robot Arm - Your Robot - V1.0

Project tutorial by Benjamin Gray

  • 28,291 views
  • 4 comments
  • 41 respects

Joy Robot (Robô Da Alegria)

Project tutorial by Igor Fonseca Albuquerque

  • 4,277 views
  • 5 comments
  • 33 respects

Kids RGB LED Star Nightlight

Project tutorial by Unexpected Maker

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