I've seen some pretty big algorithms online such as this one. How would this type of algorithm be input in Arduino? How would the motor drivers know what this variable means or compute this type of math?

  • 3
    You do the maths using standard maths functions, then pass the resulting angles on to the servo library to set the angles of the servos. Where's your problem with that? Is it with the basic understanding of how a servo works on the Arduino? Then get some cheap model plane servos and have a play with them to learn how you work with them before trying to do PHD level stuff. – Majenko Nov 25 '15 at 10:50
  • 4
    The problem is, you are asking us to distil an entire university degree module down into just a few lines of text. It just can't be done. You have to realise you can't just jump from zero knowledge to knowing everything about robotics in one single step. You have to move slower. I know you are excited about the prospects of what you could achieve, but be reasonable on yourself. Like I have said above - start with the basics and work your way up. Start by getting a small servo to do things, then work on adding a second, etc. Only when you have the basics down can you start to learn more. – Majenko Nov 25 '15 at 17:11
  • 3
    Maybe if you asked a reasonable question you would a) get an answer, and b) not have all your questions flagged for closure and/or downvoted. The biggest problem I think you have right now is that you do not comprehend the kind of questions that can be asked on this site. They must be answerable in a clear concise way. Yours cannot since they cover an absolutely gigantic topic. That is why I say start from the basics. When you have difficulty working your way up from simple to advanced topics then we are here to help you through them. What we are NOT here to do is spoon feed you advanced... – Majenko Nov 25 '15 at 17:20
  • 2
    .. problem that you are having and clearly states what you have tried, what your working environment is (circuit diagrams, etc), what code you have that isn't working, etc. A question like "I want to know how to do X" where "X" is a complex subject in its own right, is not a fit question for this site. – Majenko Nov 25 '15 at 18:11
  • Comments cleaned up. Please try to remain friendly, especially to those trying to help you. Thanks! – Anonymous Penguin Nov 26 '15 at 15:15

The formulas are already solved in wikipedia, so just use math lib to get those cos sin and atan2. If you want more speed maybe a lookup table would be a good aproach. As for the motors, servo lib places the servos in the angles you calculated before. So to answer you, yes, it can be all done.

  • For those down-voting, could you please explain why in a comment. It helps people who are viewing this answer. Providing an alternative answer is helpful also. – sa_leinad Apr 29 '17 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.