I have a variable (called delay) that is currently "unsigned long". It's from the stepper motor library. i want to increase that variable in a loop as follows:
start loop:
delay = delay + 0.0054
back to top.
I am getting very funny outputs. I know (I think) that unsigned long will not handle the 0.0054 value so what should I do? Should i change delay into a "double" variable? But how many decimal places will that work for. The fact is that I know the delay will not "in fact" increase by a fraction of a millimeter, but I want the value to increment at that fraction.
Sorry, I know that this is an easy question, but not much help out there on this...
Thanks,
Ben