use double instead of unsigned int
set valid number of microsteps on initialization
remove custom pwm logic because it complicates things