Why my Servo does not turn?


I am using this code


the connections are right (brown in GND, red in 5v and orange on d6)

why doesnt turn?

Please take a few minutes and read How to get the best out of this forum. Please do not post code in screenshots. Use code tags so that others don't have to re-type your code to figure out what's going on should the need arise. Screenshots just make it harder for you to get the help you're looking for.

As a demonstration, here's the mapping of pin numbers to values contained in variants/d1_mini/pins_arduino.h:

static const uint8_t D0   = 16;
static const uint8_t D1   = 5;
static const uint8_t D2   = 4;
static const uint8_t D3   = 0;
static const uint8_t D4   = 2;
static const uint8_t D5   = 14;
static const uint8_t D6   = 12;
static const uint8_t D7   = 13;
static const uint8_t D8   = 15;
static const uint8_t RX   = 3;
static const uint8_t TX   = 1;

If you needed to, you could just copy and paste anything out of that into your sketch. You might want to compare one of the numbers in that code block to your sketch...

Also, making people squint at pictures to try and figure out what hardware you're using also just makes things harder. Please include links to either the datasheets or at least the page you bought it from for all the hardware you're using.

I have deleted your other cross-post @igorsantos.

Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting can result in a suspension from the forum.

In the future, please only create one topic for each distinct subject matter. This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

:thinking:

Interesting, isn't that... :thinking:

A 4xAA battery pack works well.

Use the USB to power the D1 Mini.
Use the power supply for the servo.

Or, power the D1 Mini (VBUS/5V pin) and the Servo with a power supply.

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