I’m trying to control my servo motor with a nodemcu ESP-12 module with blynk. I uploaded the code but the serial monitor keeps reseting and the servo is not moving despite moving the slider widget.
When you post serial monitor output, code, compiler error messages etc you need to use triple backticks at the beginning and end so that it display correctly.
Triple backticks like like this:
```
copy and paste these if you cant find the correct symbol on your keyboard.
Please edit your post (using the pencil icon at the bottom) and add triple backticks at the beginning and end of your serial monitor output.
To get assistance with this you will also need to post your code, full details of your board and the other hardware you are using, and how all of these items are connected together and powered.
btw this is the code :
/*************************************************************
Rotate a servo using a slider!
App dashboard setup:
Slider widget (0...180) on V3
*************************************************************/
/* Fill-in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "TMPL3doa3XrPa"
#define BLYNK_TEMPLATE_NAME "servo tets"
#define BLYNK_AUTH_TOKEN "c5mcaRbdEPFQPKk2JHu97PKHO-mX5K-V"
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Servo.h>
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "SRAB65";
char pass[] = "damian@234";
Servo servo;
BLYNK_WRITE(V3)
{
servo.write(param.asInt());
}
void setup()
{
// Debug console
```Serial.begin(115200);
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
// You can also specify server:
//Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 80);
//Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, IPAddress(192,168,1,100), 8080);
servo.attach(8);
}
void loop()
{
Blynk.run();
}