MY servos don't work

Hello there. I want to do a arduino robot arm and I do everything in this video : How to make Micro Servo Robotic arm arduino based simple DIY - YouTube
My connection is: File sharing and storage made simple (but I can’t understand how to connect battery)
My program is: But it doesn’t work. Idk what to do pls help me :)))))))))))))))((
#include <Servo.h>
Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;
int potpin1 = 1;
int potpin2 = 2;
int potpin3 = 3;
int potpin4 = 4;
int val1;
int val2;
int val3;
int val4;
void setup()
void loop() {
** {**
val1 = analogRead(potpin1);
val1 = map(val1, 0, 512, 0, 180);
val2 = analogRead(potpin2);
val2 = map(val2, 0, 512, 0, 180);
val3 = analogRead(potpin3);
val3 = map(val3, 0, 512, 0, 180);
val4 = analogRead(potpin4);
val4 = map(val4, 0, 512, 0, 180);

But it doesn’t work. PLS help me :))))))))))))))))

agakarlar: But it doesn't work. PLS help me :))))))))))))))))

Stop being ridiculous and give some detail as to what exactly is going wrong.

Shot in the dark: the 9V killed your servos since they probably aren't rated for 9V.

As well as over-voltage to the servos, the button wiring is bit gimpy (search the forum on how to connect switches & buttons with pull-up).

The real clincher may be that there is no supply input shown to the Arduino itself (use Battery 9V to VIN) Last point is that the battery will last about 1 min at best with multiple servos drawing current.

((Please don't insult everyone here with Fritzing diagrams))

Idk what to do pls help me :)))))))))))))))((

PLS help me :))))))))))))))))

So, can't be bothered to type simple words like "I don't know" and "please", or reading the posing guidelines, but can find the bold control (but not the code tags), the smilies and then lean on auto-repeat keys. Or learn about arrays.

Hi, Is this related to this?

Also please read the first post in any forum entitled how to use this forum.,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png NOT the fritzy diagram you have linked too.

Can you post a picture of your project so we can see your component layout.

Thanks.. Tom.. :)

My best guess is that you want your potpins on A1 .. A4 instead of on 1 .. 4.

Jobi-Wan: My best guess is that you want your potpins on A1 .. A4 instead of on 1 .. 4.

No difference, unless they're wired to 1 to 4(digital pins)

AWOL: No difference, unless they're wired to 1 to 4(digital pins)


In analogRead(uint8_t pin) it says:

if (pin >= 14) pin -= 14; // allow for channel or pin numbers

...did not know that. Thanks.