Laser Fighting Robot

3,889

68

7

Introduction: Laser Fighting Robot

Hello, Everyone. This is a series of courses, I will share how to use cartons and arduino to make something interesting,today,I'll share with you a laser fighting robot, and I'll show you how to make a robot. By the way,I am very poor standard of English.Hope you will understand me.

Game rules, through the production of two or more battle robots, remote control of the laser head movement, when the laser light to the other side of the photosensitive resistor on the carton, the description was hit, the robot stopped working

Step 1: You Need to Prepare These Materials

Step 2: Circuit Diagram

Step 3: Assembly

In this step, I will show how to build a laser fighting robot. Servo base was use of 3d printing, of course,you can also buy in the Amazon or other web site

Step 4: Code

#include<Servo.h>

Servo servo_8;

Servo servo_9;

void setup()

{

Serial.begin(9600);

pinMode(13, OUTPUT);

pinMode(2, OUTPUT);

servo_8.attach(8);

servo_9.attach(9);

}

void loop()

{

Serial.println(analogRead(A2));

digitalWrite(13,HIGH);

if (analogRead(A2) > 150) {

digitalWrite(13,LOW);

tone(2,131);

delay(500);

noTone(2);

delay(500);

while(true);

} else {

servo_8.write((map(analogRead(A1), 1, 1023, 1, 180)));

delay(50);

servo_9.write((map(analogRead(A0), 1, 1023, 45, 135)));

delay(50);

}

}

Step 5: GameRules

You need to make two laser fighting robots.Use the joystick to control the movement of the laser head. When the laser irradiates the other side of the photosensitive resistor on the carton of the opposite party,The robot stopped working.

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    7 Discussions

    0
    Matlek
    Matlek

    3 years ago

    Cool, I love projects involving 3D printing and Arduino! And it looks easy to make, and fun to use.

    I agree with the comments below, please post a video!

    0
    DIY Hacks and How Tos

    This would be a great project for an intro to robotics class. To add another layer of difficulty, you could mount this on top of a RC car. So they have to steer and aim from different locations.

    0
    Rosamking
    Rosamking

    Reply 3 years ago

    Yes, so this is going to be a project that I will do in the future

    0
    neosarchizo
    neosarchizo

    3 years ago

    Wow!! These 3D models are mine!!

    0
    JacSjoerd
    JacSjoerd

    3 years ago

    Looks awesome.

    And I agree with BrownDogGadgets; video!

    0
    Rosamking
    Rosamking

    Reply 3 years ago

    I'll make up the video as soon as possible