Hi guys, Found and installed AccelStepper for the first time yesterday. Great little library that allowed me to get more speed out of my servo with little effort. I also wrote my own acceleration code with some basic FOR statements, just to make sure I had the concept down.
With the AccelStepper code... when the motor is turning towards its new position, it seems that all other processing on the Arduino stops – the motor function essentially uses all the cycles until the destination is reached. From the perspective of the rest of the script, it’s basically a fancy DELAY() statement.
Is it possible to have other things happening at the same time – ie. a sensor read on another pin, to interrupt and maybe stop the motor? Or a sensor read to do something else completely apart from the motor (say.. LCD display update)? If there is such a function, it wasn’t obvious to me when I read the documentation.
An alternate solution is to modify the library – find the “next step” code, and introduce a call to a function that reads in the sensors. But, I’d like to avoid modifying a standard library if I could.