set resolution and update time of the pid library
add safe mode and emergency stop