hi guys please help me. i am new to the arduino environment and i am struggling with operating the 360 degrees servo motor.
i have a Arduino/Genuino Uno.
//Here is the programming but i am basically trying to make the motor rotate to 0 degrees wait 1 second //then rotate to 180 degrees wait a second and then back to 0 degrees to collect the dog food.
//start//
#include <Servo.h>
using namespace std;
Servo myservo;
void setup()
{
myservo.attach(9);
}
void loop()
{
myservo.write(0);
delay (1000); //the motor jsut keeps spining arround in one direction//
myservo.write(180);
delay(1000);
}