Sparki turnning by degree error


#1

Hello Guys
When I use sparki.moveLeft(90.0) it turn little more than 90, something around 92 degrees.
Also when I tried this code
sparki.moveLeft()
delay(2018) its turning by somewhere around 120 degrees.

Is there way I can calibarate sparki as I did with my other robot( Parallax S2 ).


#2

Yes! This has to do with the minor differences in width between the wheels of Sparkis, and as the wheels wiggle on their motor shafts over time. You can adjust this number by opening the Sparki.h file (located in the arduino core library file, if you post your operating system I post where), and changing this line:

#define TRACK_WIDTH_CM 8.51 //tire seperation in cm

And increasing and decreasing that number. Because you’re going a little over, I would slightly increase it. We have future batches being glued on and calibrated at the factory.


#3

Thank you for reply

I use both Mac and Windows, it would be great if you would give path for both
Also can I just measure width by tape and update?
And about turning using delay, does battery charge affects?


#4

Did it on windows
had to lower the value actually
I used scale to measure distance between tires
TRACK_WIDTH_CM 8.44