Error Correction (Help ME out with this error)

Arduino: 1.6.9 (Windows 10), Board: “NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200”

sketch_sep15a:114: error: expected unqualified-id before ‘{’ token

{

^

exit status 1
expected unqualified-id before ‘{’ token

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

//I have attached the code for your reference

sketch_sep15a.ino (3.64 KB)

Maybe there is a problem on line 114, a character that should not be there for instance.

Which line is the end of your loop function?

If you post your code as described in the how to use this forum sticky, more forum members will read it.

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

#define RightMotorSpeed D5 //14
#define RightMotorDir D6 //12
#define LeftMotorSpeed D7 //13
#define LeftMotorDir D8 //15
#define LED1 D1
#define LED2 D2

char auth = “uwbrmQt90lmjBZSlHdHn4pftvz2k2zqH”; //Blynk Authentication Token
char ssid = “PKA”; //WIFI Name
char pass = “angrybird”; //WIFI Password

int minRange = 312;
int maxRange = 712;

int minspeed = 450;
int maxspeed = 1020;
int nospeed = 0;

void moveControl(int x, int y)
{
//Move Forward
if (y >= maxRange && x >= minRange && x <= maxRange)
{
digitalWrite( RightMotorDir, HIGH);
digitalWrite(LeftMotorDir, HIGH);
analogWrite(RightMotorSpeed, maxspeed);
analogWrite(LeftMotorSpeed , maxspeed);
}

//Move Forward Right
else if (x >= maxRange && y >= maxRange)
{
digitalWrite( RightMotorDir, HIGH);
digitalWrite(LeftMotorDir, HIGH);
analogWrite(RightMotorSpeed, minspeed);
analogWrite(LeftMotorSpeed , maxspeed);
}

//Move Forward Left
else if (x <= minRange && y >= maxRange)
{
digitalWrite( RightMotorDir, HIGH);
digitalWrite(LeftMotorDir, HIGH);
analogWrite(RightMotorSpeed, maxspeed);
analogWrite(LeftMotorSpeed , minspeed);
}

//No Move
else if (y < maxRange && y > minRange && x < maxRange && x > minRange)
{
analogWrite(RightMotorSpeed, nospeed);
analogWrite(LeftMotorSpeed , nospeed);
}

//Move Backward
else if (y <= minRange && x >= minRange && x <= maxRange)
{
digitalWrite( RightMotorDir, LOW);
digitalWrite(LeftMotorDir, LOW);
analogWrite(RightMotorSpeed, maxspeed);
analogWrite(LeftMotorSpeed , maxspeed);
}

//Move Backward Right
else if (y <= minRange && x <= minRange)
{
digitalWrite( RightMotorDir, LOW);
digitalWrite(LeftMotorDir, LOW);
analogWrite(RightMotorSpeed, minspeed);
analogWrite(LeftMotorSpeed , maxspeed);
}

//Move Backward Left
else if (y <= minRange && x >= maxRange)
{
digitalWrite( RightMotorDir, LOW);
digitalWrite(LeftMotorDir, LOW);
analogWrite(RightMotorSpeed, maxspeed);
analogWrite(LeftMotorSpeed , minspeed);
}
}

void setup()
{
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
pinMode(RightMotorSpeed, OUTPUT);
pinMode(LeftMotorSpeed , OUTPUT);
pinMode( RightMotorDir, OUTPUT);
pinMode(LeftMotorDir, OUTPUT);

digitalWrite(RightMotorSpeed, LOW);
digitalWrite(LeftMotorSpeed , LOW);
digitalWrite( RightMotorDir, HIGH);
digitalWrite(LeftMotorDir, HIGH);
}

void loop()
{
{
{
Blynk.run();
}
BLYNK_WRITE(V1)
{
int x = param[0].asInt();
int y = param[1].asInt();
moveControl(x, y);
}
}
digitalWrite(LED1, HIGH);
delay(1000);
digitalWrite(LED1, LOW);
delay(1000);
digitalWrite(LED2, HIGH);
delay(1000);
digitalWrite(LED2, LOW);
delay(1000);
}

//Arduino: 1.6.9 (Windows 10), Board: “NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200”

C:\Users\Prithvi K A\Documents\Arduino\sketch_sep15a\sketch_sep15a.ino: In function ‘void loop()’:

sketch_sep15a:114: error: a function-definition is not allowed here before ‘{’ token

{

^

exit status 1
a function-definition is not allowed here before ‘{’ token

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

This topic has been merged into Error Correction (Help ME out with this error).

Why did you post the same question twice ?

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a timeout from the forum.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

This topic has been merged into Error Correction (Help ME out with this error).

Yet another cross post which you have previously been warned about

Please take some time to think about what you are doing and note teh questions asked of you in the 3 threads that you have posted