Re: Servo activated by Ultrasonic Sensor

Hi, Why does my servo not stop when the flush is activated? after the first flush it just keeps going then will reverse when flushed again, and just keeps going round ?

Give us some context to work with, Stuy. Has this anything to do with the current thread? Maybe it should be a new thread...

But in any case, you need to provide your code and schematic.

Maybe it should be a new thread...

It looks even sillier as a separate thread.

I took the code from this thread: http://forum.arduino.cc/index.php?topic=284823.0

Stuy: I took the code from this thread: http://forum.arduino.cc/index.php?topic=284823.0

And? The code at the start of that thread was flawed. Was that what you are using, or did you fix any of the problems?

Post YOUR code.

I just wondered if anyone could help, the servo just keeps turning and doesn’t stop, i’ve loaded the basic sweep sketch that works, so the setup is ok… i think!

I just wondered if anyone could help, the servo just keeps turning and doesn't stop

Turning as in back and forth? Or turning as in round and round?

If it's the first one, POST YOUR CODE.

If it's the second one, dump that device in the trash and get a servo.

after the first flush

. . . of youth?

yes just keeps going round and round doesn't stop until i open the serial monitor, that resets the sketch?

yes just keeps going round and round doesn't stop until i open the serial monitor, that resets the sketch?

Yes, opening the Serial Monitor application resets the Arduino.

Your device that goes round and round is a variable speed electric motor. It is NOT a servo. Despite what the %$#Q%^Q that solid it to you called it. A servo has position feedback. That is what distinguishes a servo from a variable speed electric motor. Removing the limits, which is what allows for continuous rotation also removes the position feedback, making the device NOT a servo.