Go Down

Topic: Stepper motor (Read 572 times) previous topic - next topic

kanaramkhator

I am using a stepper motor that rotates one complete revolution in 200 pulses means 200 steps per revolution. now I want it to run 50000 revolution. can I use such big integer (i.e. 200*50000) in arduino, please put your opinion, I really need some expertise.

jremington

Use long integer variables. Long integer constants are identified with an "L" after them, e.g. 100000L.

kanaramkhator

Thanx, anything more if u want to add to it, your welcome.....

MRMAINT62

If using long integers is not enough, then don't count all of that movement in pulses. Count pulses for each 200 in a revolution, then start over counting the pulses for the next revolution and keep track of the total number of revolutions with a second variable.
Life is short, Eat dessert First!
Build Robots at all other times.
Boards: UNOv3, Mega 2560, Mega ADK, Bugduino, Pro Mini 328 5v, LinkIt ONE, MKR1000, NXT, Printrbot Simple, MakeBlock laser engraver, Silhouette, Cricket Expression, Mill, Metal Lathe.

Go Up