Notifications
Clear all

Multiple Analog servo motor movement

2 Posts
2 Users
0 Likes
2,416 Views
(@sunil)
Memberms
Joined: 4 years ago
Posts: 2
Topic starter  

Hii I am Sunil from India.

I m working on a small project which consists of 6 analog servo motors and arduino.
I want the the servos to remember the movements and get back to its initial position after some time(t=30 seconds ) by repeating the recorded movements in reverse order.
I have found the solution to do this with one servo motor.
But i m having the problem with using multiple servo motors
I don't know how to record the multiple servo motors movement and play it in reverse one after the another servo motor.
In which servos has to repeated the recorded movement in reverse order as the servos recorded movement.
Ex: If the
1. 1st servo is rotated 45°
2. 2 nd servo is rotated 90°
And
3. 3rd servo is rotated 180° manually
Once the rotation is stopped for 30 seconds
Servo has to start the movement in following order until it get back to the intial state
1. 3rd servo has to rotate 180°
2. 2nd servo has to rotate 90°
3. 1st servo has to rotate 45°

Hope someone in the forum could help me to get these results.

 

Thanks

This topic was modified 4 years ago by Sunil

   
Quote
(@fabelizer)
Member
Joined: 4 years ago
Posts: 3
 

This sounds like a job for an array. Store to the array the movements are made, and loop back through in a reverse index order. It might help if you put in some of your code and the platform you are working on. (arduino, stm, rPi, etc.) A two dimensional array would hold which servo it is, and to what position it should move.


   
ReplyQuote