Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
pranavmadhavaram
Published © GPL3+

Iron man mark 42 robot

Make your robot follow your command

AdvancedFull instructions provided230
Iron man mark 42 robot

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×4

Story

Read more

Schematics

arduino_website_2_wx5rgirqeg_ZKb9QIond9.png

Code

Untitled file

Arduino
#include <Servo.h>

Servo pranav;
Servo akshar;

Servo pranav1;
Servo akshar1;


void setup() {
  // put your setup code here, to run once:
pranav.attach(4);
akshar.attach(5);
pranav1.attach(6);
 akshar1.attach(7);

 
}

void loop() {
  // put your main code here, to run repeatedly:
if(Serial.available() > 0)  
{
char data= Serial.read();      
Serial.print(data);        
Serial.println(data);         
if(data == 'a')           
{pranav.write(180);
}
else if(data == 'b')       
{pranav.write(0);
 }
else if(data=='c') 
{akshar.write(180);}
else if(data=='d') 
{akshar.write(0);
}

else if(data=='e') 
{pranav1.write(90);
akshar1.write(0);
delay(1000);
pranav1.write(45);
delay(1000);
akshar1.write(90);
pranav1.write(0);
delay(1000);
akshar1.write(45);
delay(1000);}
else if(data == 'f')           
{pranav.write(180);
akshar.write(180);
}
else if(data == 'g')           
{pranav.write(0);
akshar.write(0);
}




                        

}
} 

Credits

pranavmadhavaram
16 projects • 1 follower
Contact

Comments

Please log in or sign up to comment.