Hi frnds :),
I am a new guy in this field.so ,i really need a help.
I am doing a project on online object tracking.I have made a 3 dof robot with 3 servos attached.Using simulink and matlab , i am able to get the co-ordinates of any moving object and convert it to angles for rotation of the servo motors in the robot joints.Servos are controlled using arduino uno.
While i am using the example sweep program in arduino, the motors are rotating perfectly,ie, 30 deg for 30 deg. But while doing real time tracking,ie, angle values are continuously sent, the motors are not rotating as expected. 3 angles are there. output from matlab is as in the sequnce.angle 1, angle2,angle3 for base , middle and gun.(robot,s 3 joints).they are send in that sequence.but,whatever changes in angular values occur,they wil rotate only in some specified 2 or 3 angles for any output value.
I dont know what to do.Can anybody please help me, I am nearing the end of my project work and hav to make it correct as soon as possible.Please do respond
i wil paste my arduino command here
Servo gun; //AT 9
Servo middle;//AT 10
Servo base;// AT 11
gun.attach(9); // attaches the servo on pin 9 to the servo object
mymotors = i%3;
i = i+1;
ALso, please do tell me…is there any specific code or something in arduino that can make the robot go to its home position.