Go Down

Topic: [HELP] Stepper Motor Spins while uploading the code (Read 669 times) previous topic - next topic


Feb 16, 2017, 07:23 pm Last Edit: Feb 17, 2017, 08:30 am by crysty1338

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.

My YouTube Channel "Arduino Enthu"


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.

Stepper Motor Basics
Simple Stepper Code
Two or three hours spent thinking and reading documentation solves most programming problems.


You are probably missing a pull-down resistor on the step pin.
Or perhaps are using RX or TX pin for step?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


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?

Before you ask:
Did you really read and understand How to use this forum ?
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

Go Up