Hello Guys,In this post we learn how to control servo motor using nodemcu in easy way.
Let Start it:-
*specification
-you can use to control servo motor.
-In easy way
-cheap in price.
*Parts Required
1.Nodemcu
2.Servo Motor
*Schematics & Diagrams
-do all the connection according to this diagram.
-connect 3 volt to red and black wire and orange wire to D4.
*Lets coding time
-Copy The following code in ardunio ide
/*********
-Tech Gyan Creative
Complete project details at https://techgyancreative.blogspot.com
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
*********/
// Import required libraries#include <Servo.h>
Servo servo;
void setup() {
servo.attach(2); //D4
servo.write(0);
delay(2000);
}
void loop() {
servo.write(90);
delay(1000);
servo.write(0);
delay(1000);
}


