How save servos position in a SD card

Pages: 12
Apr 24, 2018 at 9:01am
Are you aware that you can dramtatically reduce the amount of data when you store just the values when they changed?

I have alredy solved this problem, putting the following code at the end of the program:
Yes would have suggested something similar. There should be a documentation for this.
Apr 26, 2018 at 1:06pm
Are you aware that you can dramtatically reduce the amount of data when you store just the values when they changed?


How I can do that?
Although the truth is that right now with the SD card I have memory problem, but, maybe it would help to dinamize the program?

Thanks,

Urko.
Apr 26, 2018 at 2:13pm
We talked about this way way back with your original thread on it.

You would probably need to decouple the motors so each one had its own input stream of desired position and how long to sit there. Alternately you could compress the data files, even keep them compressed in memory, and decompress just in time to consume. That would earn you a LOT of space back, as the data is so redundant.
Apr 27, 2018 at 11:05am
Ah! yes you're right it's true I remember that thread!

Anyway now with the implementation of the SD I no longer have the problem of space that I had before with what I am going to focus on other aspects to improve such as turning the robot into a collaborative robot, that is, to be able to control the torque all the time.

To try to do that I already opened a new forum (http://www.cplusplus.com/forum/general/228577/3/), and although it seemed that we had all managed to work, it was not like that. Yes, it is true that sometimes I read the torque, but most of the time the torque data of the engines that the program reads is -1, which means that it is not working properly.

So I will try to continue with this problem, since my project ends at the end of June and if I do more things better it will be better.

Many thanks!

Urko.
Apr 27, 2018 at 11:16am
How I can do that?
Well, it depens on the fact that the motors move linear. Thus you need to store the endpoint only and not like now all the intermediate values that may be the same for several times.

But since this would be an optimization and your time is limited, it might be better to leave it as it is if you satisfied with the outcome.
May 7, 2018 at 6:34am
I understand what you want to tell me, but as I said I still have things to do, in the case that I finish them I will try to do what you tell me!

Thank you very much for all your advice!

Urko.
Topic archived. No new replies allowed.
Pages: 12