Sign In

Servo Motor Exact Three 90degree Rotation

Shinekaushik kaushik.sunil007@gmail.com India

Hardware: Arduino UNO/Mega Software: Arduino Latest IDE

i am using continuous servo S3006. want to rotate it exact 90+90+90 =270 degree.motor goes clockwise below 89 degree and goes anticlockwise above 90 degree.

Images

Program

#include <Servo.h>

//#define TURN_TIME 175

Servo myservo;
//int pos=0;

void setup ()
{
    myservo.attach(7);
    myservo.write(0);
     delay(1000);
     
   
}

void loop() {
 /{
      myservo.attach(7); 
      delay(20);  
      myservo.write(89); 
      delay(1000);
      myservo.detach();
      delay(1000); 
      myservo.attach(7); 
      delay(20);  
      myservo.write(89); 
      delay(1000);       
      myservo.detach();
      delay(1000); 
      myservo.attach(7); 
      delay(20);
      myservo.write(89); 
      delay(1000); 
      myservo.detach();
      delay(1000); 
     
     
  }

Post a reply to Shinekaushik

Think you can help Shinekaushik ? Then post your thoughts that might help Shinekaushik. You will earn a lot of reputation in the technical community.

If your program is in multiple files, then ZIP the entire folder and attach below

Images and Screenshots

These helps other better understand your suggestion.