Go Down

Topic: stop() functio (Read 2977 times) previous topic - next topic



I'm new in Arduino and need your advice.

I'd built my first bot. This is tank-like platform controlled by two motors.
For controlling I have functions like

void forward();
void left();
void right();
void stop();
and so on.

When I do something like


this doesn't work as expected.
But when I rename stop() to stopMotors() it runs!

So, is stop() a predefined function?
and if yes, what does it do?


Coding Badly

The only "stop" I can find is in the Ethernet Client library.  Are you using this library?


No. I don't use any libraries.

Any more suggestions?



Is the unexpected behavior that it just drives forward no matter what?

That's what would happen if stop() didnt do anything, but stopmotors() might actually call some code that does something.

does stopmotors() call some kind of delay or something, enabling a left turn and other behaviour?
3D Artist,Modeler, Texturer, Animator, Electronics and Robotics, Programming C, VB, Website Design, Flash animator

Too many hobbies?


It seems to be my problem.
Because when I give full power to motors, motor driver halts often. When I'm using PWM to start moving robot, it works well.

So it not a problem with stop() function. It may be a problem with high initial current for motors  :)

Thanks for replies :)

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131