Void loop servo problem

Hi All,

Maybe this is not so hard, but after tryijng a lot I can not make my servo work in this void loop.
The servo gets blocked somehow when I run it in the same loop. Any ideas?

Please post your code, using code tags when you do

How is the servo powered ?

Hi UKHeliBob,

It is powered from the Arduino.
It has to do with the delay that is needed when the Spotifyserver gets contacted to update for example the devicevolume setting I think.
When I leave that code out of the loop, it runs fine.

It doesn't compile. How do you know there will be a problem with the servo?

Generally, not a good idea. You may get away with it with a small servo and light loading, but best to have separate power for servos.

It runs a small Microservo.
Sorry, I forgot to mention that it runs on smalla esp8266 board programmed by Arduino IDE.

The sketch that you posted is incomplete

What voltage does that servo need? 3V3 sounds rather low.

Power HD 1440A,

https://www.pololu.com/product/1040

From the datasheet:

Operating Voltage Range 4.8V~6.0V

Also from the datasheet

No-load current @ 6V: 110 mA
Stall current @ 6V: 320 mA

Yes, I run it from the 5V output of esp8266 Mini board powered by USB.

I understand the powersupply concern. I powered it externally also. Same as powered by the board itself...

The thing is, when I replace the code in the Void Loop with a sweep, from 0 to 180 degrees and back for example, it runs fine. The code that I wrote to set the servo to a position also works. It just gets blocked by the code that is above in the loop that polls the Spotify server I think.