Invalid Auth Tokennn

Before creating the topic

  1. Search forum for similar topics
  2. Check http://docs.blynk.cc and http://help.blynk.cc/
  3. Add details :
    • Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
    • Smartphone OS (iOS or Android) + version
    • Blynk server or local server
    • Blynk Library version
    • Add your sketch code. :point_up:Code should be formatted as example below.

Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.


void loop()

```#define BLYNK_TEMPLATE_ID "TMPLtKOX46Fx"
#define BLYNK_DEVICE_NAME "WaterLEVEL DISPLAY"
#define BLYNK_PRINT SwSerial
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
#include <BlynkSimpleStream.h>
char auth[] = "TgnkiimNzysFh345mZgtkqgckay4xAqc";


WidgetLCD lcd(V1);
long duration, distance;
int trig =4;
int eco =5;

BlynkTimer timer;
void myTimerEvent()
{
  int data = analogRead(A2)*(3.20/1023.0)*100.0;
  Blynk.virtualWrite(V5, data);
}

BLYNK_WRITE(V2)
{
  int pinValue = param.asInt();
  digitalWrite(2, pinValue);
  digitalWrite(3, pinValue);
}

void setup()
{
  SwSerial.begin(9600);
  Serial.begin(9600);
  Blynk.begin(Serial, auth);
  timer.setInterval(1000L, myTimerEvent);

  pinMode(trig, OUTPUT);
  pinMode(eco, INPUT);
  lcd.clear();
  lcd.print(0, 0, "distance CM");
}

void loop()
{
  lcd.clear();
  lcd.print(0, 0, "distance CM");
  
  digitalWrite(trig, LOW);
  delayMicroseconds(3);
  digitalWrite(trig, HIGH);
  delayMicroseconds(10);
  digitalWrite(trig,LOW);

  duration = pulseIn(eco, HIGH);
  distance = (duration/2) /588.10;
  lcd.print(7,1, distance);
  
  Blynk.run();
  timer.run(); // Initiates BlynkTimer
  delay(1000);
}

Have you edited the USB script to use blynk.cloud as the server rather than blynk-cloud.com ?

Pete.