In the previous post, we saw that stepper motor control is relatively simple with Raspybot, although currently it only supports the class InterfaceGPIO as layer of connection with the Raspberry Pi. In this example I'll show how to control a stepper motor in a non-blocking manner.

The devices in Raspybot are based on threads to perform their duties in a transparent mode, although at the expense of
losing some speed,but thanks to this, the main thread script can continue doing other tasks or control any other device.

Basically it is to avoid calling the MotorStepper's "join" method since this method blocks the main thread Python script
until the motor stepper has finished the last task received. Sometimes this method may be useful but not when we want to
continue performing other tasks in our script.

With the "alive" method we can know when the engine has stopped, provided that the last method called has received a number
certain of steps or a certain angle. The "forward" and "backward" methods can receive three two types of parameters:
"steps" or, "degrees" or time, and will stop when the received instruction is completed. If we want the motor
to rotate indefinitely we just have to call "forward" or "backward" methods with a negative number of steps and the motor
will rotate until the script ends or until the MotorStepper's "stop" method is called.

The example code is very simple and is composed of two parts: the first part with a "while" loop is shown using the "forward"
and "backward" methods, and the second part with a "for" loop shows how use the "angle_to" method to move the stepper motor.