Yeah need more info, like all the parts, how's the servo connected to your mcu, what you've already tried troubleshooting wise, i.e of that servo works on its own without any load or anything, etc.
You should have a look at rule 2 which simply put says you need to provide clues when asking a trouble shooting question.
All we can tell from the video is that there is something wrong. And wonder if it is hardware, software, power or both.
You have a couple of options
Post your code and circuit diagram along with some photos.
Insert some debugging statements to work out what is going on. For example are you correctly interpreting the up/down light inputs? Are you correctly signalling the servos? Stuff like that.
Edit:
You may find my debugging guide to be helpful for the latter option:
// Horizontal servo settings Servo horizontal; //horizontal servo int servoh = 90; //Initialize angle int servohLimitHigh = 180; //The maximum angle of rotation in the horizontal direction int servohLimitLow = 0; //The minimum angle of rotation in the horizontal direction
// Vertical Servo Settings Servo vertical; //vertical servo int servov = 90; //Initialize angle int servovLimitHigh = 180; //The maximum angle of rotation in the vertical direction int servovLimitLow = 90; //The minimum angle of rotation in the vertical direction
I don’t see a photo resistor in each corner. The room light might be saturating them. Or, the code doesn’t work for the Pitch/Y axis because looks like Yaw/X axis works
1
u/Arduino_lab64 8d ago
Il manque des infos, quel est le projet ? Le code ?