[solved]Problem with stepper motor and seria connection

I am working on an arduino project and where I have a stepper motor connected along with other componenets, when I tery to print on serial the stepper does not work and if the stepper worked it interrupts the serial and sends irreadable characters. I am using 5V 28BYJ-48 with driver ULN2003 and <Stepper.h> library

How are you powering your stepper and driver?

1 Like

Please post a schematic. Written descriptions are always more ambiguous than a drawing. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.

Do not use pins 0 or 1 for anything if you are using the serial port (Serial.begin() is in your code). Those pins are for the hardware serial (USB) port.

Please read the how to get the most from the forum post. The post contains information on what we need to know in order to help you.

What Arduino board?

1 Like

And, if you're using your Arduino's 5V output(with or without USB connected), consider:

1 Like

I am powering them form an external 5V adapter

Sorry for not asking properly, I was using the oins 1 and 2 and when I changed them to 11 and 12 It worked, Thank you!!

The problem was in the pins that I was using for the connection between ULN2003 and Arduino, as I changed 1,2( used for serial hardware as pointed out by @groundFungus ) to 11,12 it worked, Thank you Anyways.

If your question has been answered to your satisfaction, please mark the thread as solved so that other members that wish to help will not waste their time opening the thread only to find that you no longer require assistance.

2 Likes

Good to hear. The power issue is one of the most common, so I thought it bore mention.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.