motor and collision handling with interrupt