Hey guys, im new here and i really need your help in my college project. for now i just try to learn how to work with blynk and light up a led.
im trying to connect esp32 to blynk app and i get “Invalid auth token” in the Monitor.
this is what i get in the monitor:
Connecting to Dvir
....E (4582) wifi:Association refused temporarily, comeback time 649 mSec
......WiFi connected
[5157] Connecting to Dvir
[7670] Connected to WiFi
[7670] IP: 192.168.1.125
[7670]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v1.0.1 on ESP32
[7680] Connecting to blynk.cloud:80
[8542] Invalid auth token
and this is my code:
#define BLYNK_PRINT Serial
int pin = 21;
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "FE__ssOnWS84G2keAUvqSfTBAa5yEp7O";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Dvir";
char pass[] = "dvir5558";
void setup() {
pinMode(pin, OUTPUT);
pinMode(pin, HIGH);
Serial.begin(115200);
delay(10);
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
int wifi_ctr = 0;
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("WiFi connected");
Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
}
void loop(){
Blynk.run();
}