After using the servo, the MH-ET does not work

after using board with servo and pir sensor, MH-ET is said to work. the board is connected to usb
#include <Servo.h>

Servo myservo;

void setup() {

myservo.attach(3);
myservo.write(180);
}
void loop() {
if (analogRead(A0) > 500){
myservo.write(10);

}
else {
myservo.write(180);
}
}

1 Like

What information did you put in your post that would allow others to help you?

Such as are your MCU's burning up and that's why 2nd board?

How is the servo wired up?

Did you post your code in code tags?

Have you considered posting an image of your project?

@rom_epta a Haiku? Excellent! Very deep and mysterious!

How did I know the OP was NOT going to use code tags?

#include <Servo.h>

Servo myservo;

void setup() {

myservo.attach(3);
myservo.write(180);
}
void loop() {
if (analogRead(A0) > 500){
myservo.write(10);

}
else {
myservo.write(180);
}
}

That's code in code tags.

How about the image?

thanks for helping me add to the thread

yes

Image of the project?

What's on A0 to make it have a value?

Schematic, image of the project?

How does the servo get power? Image of the project?


I'm sorry that you had to wait so long

powering a servo from the MCU will, in most cases, cause the MCU to burn up.

Using this


and words like "powering servo" may get you a few clues or not.

without servo, the board does not work

good luck.

what can be done about it?

Post#9 did not help?

yes

maybe this will help

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