Modified for serial motor control