I want the servo motor when it detects something, it rotates to the left and rotates back. when it senses something else, it rotates to the right and then rotates back. Any suggestions? for a sketch would be greatly appreciated
thank you
Hello yan_yano_0
Follow the example code that comes with the library or
run some tutorials for the hardware selected.
If you are happy with the results of the tutorials you can merge these to your project.
Have a nice day and enjoy coding in C++.
Detects what? How? The servo motor test sketch is a good place to start.
Many servo issues are power related.
What specific servo did you have in mind? It does matter. What voltage servo? Hard to write code without hardware details.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.