Nema 17 stepper motor arduino code l298n. the same code without if works fine.