I have searched for similar topics and can’t find the answer I need.
I have built a distance sensor using wemos D1 mini
I had a guy write the code for Blynk and when I try to upload thru Arduino I get
Blynk.begin line highlighted with the error message- pass not declared in this scope-
Below is the code, I don’t write code and I would appreciate any help I could get.
#define BLYNK_PRINT Serial
#define CALIBRATION 0.968656756
//pins for the distance sensor HSSR04
#define trigPin D5
#define echoPin D6
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
//////////////////////////////////////////////////////auth code sent to your mail
char auth[] = "6aa3eed2506d4a158f3aae3dxxxxxx";
///////////////////////////////////////////////////
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid [] = "NETWORK77";
char password [] = "82FCB97xxx";
//////////////////////////////////////////////////////////
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
timer.setInterval(1000L, myTimerEvent);
}
void loop()
{
Blynk.run();
timer.run(); // running timer every second
}
////_____________________________
void myTimerEvent()
{
Blynk.virtualWrite(V1,distanceReading() );
}
long distanceReading(){
float duration, distance; //our beloved variables
digitalWrite(trigPin, LOW); //PULSE ___|---|___
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = ((duration*0.0168422+0.221)*0.393701)*CALIBRATION;//returns inches 1cm =*0.393701 inches
//Serial.print("distance(inch): ");Serial.println(distance);
return distance;
}