[HELP] Stepper Motor Spins while uploading the code

Hello,

Every time I upload my updated code, while uploading, my stepper motor spins. This also happens when I plug my arduino to power.
I have no idea why he's doing that... Code below:

Solved: it only makes this when you update the code, but when you use a different power source for the installation there will be no problems.

You only using 2 pins for stepper motors ?.

Make sure your IR receiver pulled up or pulled down any one need.

provide separate power supply for stepper motor.

Clear all the variable and register before enter into loop.

What stepper motor drive are you using and how is it connected to the Arduino? And please do NOT post a Fritzing diagram. A photo of a simple pencil drawing will be much easier to understand, even if you are an awful artist.

While it is not relevant to your problem your code will be much easier to read and less error prone if you use variables (such as stepPin) to hold the values of the pins. That way, when reading the code you don't have to remember what pin 5 is connected to.

...R
Stepper Motor Basics
Simple Stepper Code

You are probably missing a pull-down resistor on the step pin.
Or perhaps are using RX or TX pin for step?

Apparently solved as there is no further reaction by the TO.
I also suspected RX/TX connections (when updating code), but would that explain also the behaviour in the powering up sequence?