Does anyone have a rough outline of what code would be required to tell a servo to go from where it is currently positioned up by 1 degree? I’m thinking about creating a robotic arm but the motion would need to be controlled by holding down a button and keep moving until it stops.
None of the projects I’ve done to date have included using the loop, rather only using the int commands and I was wondering if there’s something in the loop I can use. Basically, the below but using real code.
I would try inverse kinematics to let the processor deal with specific angles and let you focus on specifying only the endpoint of the business end of your robotic arm.
i just thought i would mention that every time i come up with an idea that at some point i get stumped on something when i do a google search on keywords that express at least the concepts of the idea it turns out someone has already done very similar projects from which i can gain good insights and solutions. even though this means i have not thought of anything really new it also means a great deal of the time the solution exists i just need to find it. good luck on your project.
You’re absolutely right! That’s exactly the plan. Thanks so much.
I don’t suppose you know what I would need to change in the code for it to be accepted on a Photon do you? I know it doesn’t need the servo.h but is there anything else or do you think it would just work?