Updated motorTask to read from the motor queue.