Potentiometer controll Servo motor issue

Followed a tutorial found on https://www.instructables.com/id/Controlling-3-servo-motors-with-3-potentiometers-a/ to build a crane type structure with moving Servo 9G motors controlled by Potentiometers.

First time i built it only the first motor would work with potentiometer so fiddled with some cables and now none work. Took it apart built it the same as first time and no motors are functioning.

Using a Wemos D1 R2 board and 9V battery. Either thinking that the pin layout is different or motors under powered.

I have attached the layout, board and code.

Any help would be appreciated, this is my first project.

#include <Servo.h>

Servo myservo3;

Servo myservo5;

Servo myservo6;


int potpin = 0;
int potpin2 = 1;

int potpin3 = 2;

int val = 0;
int val2 = 0;

int val3 = 0;

void setup()
{

myservo3.attach(D6);
myservo5.attach(D7);

myservo6.attach(D8);

}

void loop()
{

val = analogRead(potpin);
val = map(val, 3, 1023, 0, 176);

myservo3.write(val);


val2 = analogRead(potpin2);
val2 = map(val2, 3, 1023, 0, 176);

myservo5.write(val2);


val3 = analogRead(potpin3);
val3 = map(val3, 3, 1023, 0, 175);

myservo6.write(val3);


}

Annotation 2019-11-29 000428.png

What 9v battery are you using and how are you powering the servos?

If it is a PP3 style smoke alarm battery then that is most likely the problem as those little batteries can't provide enough current.

Use a pack of 6 x AA alkaline cells for 9v. And give the servos a separate power supply (4.8v to 6v, IIRC) with the servo GND connected to the Wemos GND.

I am assuming that (like an Uno or Mega) a Wemos will be overloaded if used to supply power to servos or motors.

...R

The common small rectangular 9V battery is useless for powering servos. Instructables are usually pretty poor but at least that one had the sense to say you needed 4 x AA batteries. So that would normally be the first thing to change.

But the real problem is that as far as I know a Wemos D1 only has one analog input pin (max 3.3V). So you can't connect 3 pots to it. Where did you find the A1 and A2 pins that you needed? Also connecting a pot with 5V to A0 has probably killed that pin now.

Steve