Compiling Errors

‘param’ was not declared in this scope

sketch_mar13a:21: error: 'param' was not declared in this scope

   int V= param.asInt(V1);

          ^

C:\Users\LOGIC ONE\Documents\Arduino\sketch_mar13a\sketch_mar13a.ino: In function 'void BlynkWidgetWrite1()':

sketch_mar13a:68: error: 'pinvalue1' was not declared in this scope

    myservo.write(pinvalue1);

                  ^

Multiple libraries were found for "Servo.h"
 Used: C:\Users\LOGIC ONE\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Servo
 Not used: C:\Program Files (x86)\Arduino\libraries\Servo
exit status 1
'param' was not declared in this scope

this is my code

#include <Servo.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>


Servo myservo;
int rfright = 14 ;
int rfmid = 12;
int rfleft = 13; 
  
char auth[] = "a7436918884f406492d4be5e74023032";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "*******";
char pass[] = "******";

  int right= digitalRead(rfright);
  int left=digitalRead(rfleft);
  int mid= digitalRead(rfmid);
  int V= param.asInt(V1);

void setup() 
{
  // put your setup code here, to run once:
pinMode(rfleft, INPUT);
pinMode(rfmid, INPUT);
pinMode(rfright, INPUT);

// You can also specify server:
 Serial.begin(9600);
 Blynk.begin(auth, ssid, pass);
 myservo.attach(15); 
}
BLYNK_WRITE(V1) // Run this function when V1 button pressed.
{
     int pinValue = param.asInt();  // Get status of V1.
    if (pinValue == 1)
    {  // If status of V1 is 1 then do stuff in if().
      void BlynkWidgetWrite1();
    }
    if (pinValue == 0)
    {
if(right == LOW)

    {
        myservo.write(120);
        delay(50);
      }
if(left == LOW)
    {
      myservo.write(30);
    delay(50);
    
    }
  if (mid == LOW)
    {
      myservo.write(80);
    delay(50);
    }     
   }
}
 void BlynkWidgetWrite1()
 
  {
  
   int pinValue1 = V;
   myservo.write(pinvalue1);
}

void loop()


{
  Blynk.run();
}

You declared the variable on the line above as pinValue1 , see the difference?


#include <Servo.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

Servo myservo;
int rfright = 14 ;
int rfmid = 12;
int rfleft = 13; 
int pinio =16;  
char auth[] = "a7436918884f406492d4be5e74023032";// Your WiFi credentials.

char ssid[] = "@@@;// Set password to " for open networks.
char pass[] = "highlevel";

int right= digitalRead(rfright);
int left=digitalRead(rfleft);
int mid= digitalRead(rfmid);
int piniochange= digitalRead(pinio);
void setup() 
{
  // put your setup code here, to run once:
pinMode(rfleft, INPUT);
pinMode(rfmid, INPUT);
pinMode(rfright, INPUT);
pinMode(pinio, INPUT);
// You can also specify server:
 Serial.begin(9600);
 Blynk.begin(auth, ssid, pass);
 lcd.begin(16,2);
  lcd.init();

  // Turn on the backlight.
  lcd.backlight();

  
 myservo.attach(15); 


}

void loop()
{
if(piniochange == 1)
{
    {
if(right == LOW)

    {
        myservo.write(120);
        delay(50);
      }
if(left == LOW)
    {
      myservo.write(30);
    delay(50);
    
    }
  if (mid == LOW)
    {
      myservo.write(80);
    delay(50);
    }     
}
}
    if(piniochange == 0);
  {
  
BLYNK_WRITE(V3) 
  {

    myservo.write(param.asInt());
}
  

}
Blynk.run();

}
sketch_mar13a:71: error: a function-definition is not allowed here before '{' token

   {

   ^

This is not a learn how to code forum.

@Divakar_Pandiyan Please learn and follow the proper way to post code in this forum… any further unformatted posts with be deleted.

Blynk - FTFC