Search the Blog

Thursday, August 15, 2019

Arduino uno board complete code of ROBOT

Arduino Uno board Code for maze robot for path ROBOT

Arduino uno board complete code of ROBOT


#include<Servo.h>


Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;

int amsr=9;
int amsl=7;
int amskr=10;
int amskl=8;




int aamsl;


void setup()
{


  servo2.attach(amsr);
  servo1.attach(amskr);
  servo3.attach(amsl);
  servo4.attach(amskl);

}


void loop()
{

 {
  for(aamsl=150;aamsl>30;aamsl--)
  {
    int ab=180-aamsl;
    servo2.write(aamsl);
    servo3.write(ab);
  delay(3);
  }
  delay(1000);
  for(int i=1;i<=3;i++)
  {
  for(aamsl=150;aamsl>60;aamsl--)
  {
    int fg=aamsl-50;
    servo1.write(aamsl);
    servo4.write(fg);
  delay(20);
  }
  delay(1000);
  for(aamsl=60;aamsl<150;aamsl++)
  {
    int fd=aamsl+50;
    servo1.write(aamsl);
    servo4.write(fd);
  delay(20);
  }
  }
  delay(1000);
  for(aamsl=30;aamsl<150;aamsl++)
  {
    int cd=180-aamsl;
    servo2.write(aamsl);
    servo3.write(cd);
  delay(20);
  }
  delay(1000);

 }
}


JAVA Triangle * Pattern Program Logic one Programming Logic and Code with Syntax

No comments:

Post a Comment

Translate