Hi guys, I any help is appreciated, I'm on college and we are currently on microprocessors, My professor asked me to make a robotic arm (Using Servos), I need to program an Arduino to record the movement of a servo (Manually), literally by moving its arms, record those movement and playback those movements in a loop. Please help
I did a similar project. I ended up using a rotary encoder for each axis to move each of the servos to position (like the knob example) and a push button switch to record each set of positions. I did it that way for 2 main reasons. 1. You can't know the position of the servo arm without buying a special servo or modifying a standard servo by breaking out the feedback pot output. And 2. moving the servos by hand was very hard on the servos.
Thank you, I appreciate your reply, I just had to ask can the SG90 Tower Pro, sense input data ? When I first heard the task my professor gave me I was shocked because I dont know how to make these standard servo input data to the micro controller.
You can only tell a standard servo where to go. The microcontroller can't know if the servo actually got there, though. The only way for the microcontroller to know where the servo arm is is for there to be feedback from the servo to the microcontroller.
There is a servo.read() function, but that function returns the last position that was sent to the servo by your code, not where the servo arm is.
In the thread that you cross posted, there is more information on the subject.