how to fix millis code instead of delay
if (encoder > 0){ digitalWrite(motor_direction, HIGH); // output direction HIGH digitalWrite(motor_step, HIGH); // output step HIGH digitalWrite(motor_step, LOW); // output step LOW _delay_us(900); // tunggu 200 microsecond motor_position++; // posisi motor bergeser tambah satu point encoder = 0; // reset ke 0 } else if (encoder < 0){ digitalWrite(motor_direction, LOW); // output direction LOW digitalWrite(motor_step, HIGH); // output step HIGH digitalWrite(motor_step, LOW); // output step LOW _delay_us(900); // tunggu 200 microsecond motor_position--; // posisi motor bergeser tambah satu point encoder = 0; // reset ke 0 }