Arduino Forum

Topics => Robotics => Topic started by: 2ndattempt on Feb 27, 2014, 08:14 pm

Title: Store servo Pwm values
Post by: 2ndattempt on Feb 27, 2014, 08:14 pm
Hi

I´m working in a project with a robot (freeduino board, 2  full rotation servomotors and two photoresistors). Basically is a light seeker.

But i´m wondering if it would be possible to print in the monitor the servo pwm values written while they are making the circuit guided for the light, for the purpose of store them after in an array and re-write them without the need of the light, so that the robot could represent again the circuit by itself.

Thanks guys
any suggestion or advice will be very very helpful.

cheers
Title: Re: Store servo Pwm values
Post by: Chagrin on Feb 28, 2014, 07:38 am
You could use the EEPROM library (http://www.arduino.cc/en/Reference/EEPROM) to store the values in the EEPROM, but you only get 1024 bytes total. That would be enough for 512 readings (one from each motor) if you leave a decent amount of time between sampling the values.

If you need more space than that you would have to jump to an SD card.
Title: Re: Store servo Pwm values
Post by: 2ndattempt on Mar 01, 2014, 09:47 pm
Thank you very much Chagrin.

I guess you meant using the Eeprom Write function i could store the data gotten by sensors for then write them on the servos.
I thought i could store pwm´s pulses, do you think that it would be possible?

Anyway, thanks a lot. I will try it and post here the results of my tests.

;)