A
Arduino5mo ago
sfloon

Save & Play Arm “Animation”

I’m making an arm controlled by potentiometers and servos. An idea of mine is that a button will be made for recording a series of potentiometer inputs which can then later be played with another button. My questions are: A. How this would even work B. Does the Arduino Uno even have enough storage for that
12 Replies
sfloon
sfloonOP5mo ago
i was thinking of just adding every millisecond or whatever to a table but that seems inefficient
AnonEngineering
AnonEngineering5mo ago
You could experiment with how often you need to save the position so that playback is " good enough", maybe you need every ms, maybe you only need every 100 ms...
DarwinWasWrong
DarwinWasWrong5mo ago
You do not need to store time. Store changes and the time they happen. wrist --- 90 @ 2100 elbow -- 30 @ 2200 wrist -- 80 @ 2200 eg doesnt need to be continous
sfloon
sfloonOP5mo ago
the reason i thought about storing time was because if there is a pause in the animation for whatever reason, it could be recorded
DarwinWasWrong
DarwinWasWrong5mo ago
That is done via the stored this happens then Much like animation key fram. Eg Time, wrist pos, elbow pos, shoulder pos.
100 , 59, 59, 50
300 , 9 , 59, 50
700 , 39, 20, 20
100 , 59, 59, 50
300 , 9 , 59, 50
700 , 39, 20, 20
Between 100 and 300 the values remain the same, then @ 300 elbow moves.
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
DarwinWasWrong
DarwinWasWrong5mo ago
Over complicated as you can do that with the interpreting what amount of change determines a record
sfloon
sfloonOP5mo ago
would i need two separate arrays for that?
DarwinWasWrong
DarwinWasWrong5mo ago
you can create a struct
typedef struct move_record {
uint64_t time_stamp;
uint8_t shoulder_rotate_move;
uint8_t elbow_rotate_move;
uint8_t wrist_rotate_move;
uint8_t wrist_bend_move;
}
move_records;
typedef struct move_record {
uint64_t time_stamp;
uint8_t shoulder_rotate_move;
uint8_t elbow_rotate_move;
uint8_t wrist_rotate_move;
uint8_t wrist_bend_move;
}
move_records;
then
move_records moving_records[1000];
move_records moving_records[1000];
What is the project ? an arm ? And questions. do you record the positioning as continuous moves or move to a position in a fixed times and push a button to record.
DarwinWasWrong
DarwinWasWrong5mo ago
GitHub
ServoEasing/examples/RobotArmControl at master · ArminJo/ServoEasing
Arduino library to enable smooth servo movement. Contribute to ArminJo/ServoEasing development by creating an account on GitHub.
DarwinWasWrong
DarwinWasWrong5mo ago
GitHub
GitHub - ArminJo/ServoEasing: Arduino library to enable smooth serv...
Arduino library to enable smooth servo movement. Contribute to ArminJo/ServoEasing development by creating an account on GitHub.
sfloon
sfloonOP5mo ago
thanks!

Did you find this page helpful?