Hi,
This is a pretty cool project!
First, could you attach a picture of your circuit, including the Arduino/breadboard with the wires connected to it/servo motor?
Also, just to make sure I'm understanding the question correctly -- is your problem that the servo motor is only working when the potentiometer is moving (but actually the servo motor should be moving continuously)? You should be able to see that when you have the potentiometer in the middle, the servo motor stops; likewise, when you move the potentiometer all the way to the left or right, the motor should spin full speed clockwise or counterclockwise.
If that isn't working, one option is to first try running the servo motor without the potentiometer for a few minutes, just to make sure that the 360 motor does actually work.
Here's some sample code for that (a more detailed look at the code can be found here:
https://www.makerguides.com/how-to-cont ... h-arduino/)
// Include the library
#include "Servo.h"
// Create the servo object
Servo myservo;
// Setup section to run once
void setup() {
myservo.attach(8); // attach the servo to our servo object
myservo.write(90); // stop the motor
}
// Loop to keep the motor turning!
void loop() {
myservo.write(45); // rotate the motor counter-clockwise
delay(5000); // keep rotating for 5 seconds (5000 milliseconds)
myservo.write(90); // stop the motor
delay(5000); // stay stopped
myservo.write(135); // rotate the motor clockwise
delay(5000); // keep rotating
}
It would be great if you could attach a picture of your circuit and then let me know whether the servo was able to run successfully without the potentiometer. Then I can help you look into the problem further.
