I am using a Sketch to control the NeoPixels over my Phone. The Token from the APP reports me all the time as invalid. What could be the reason?
[17324] Connecting to UPC
[21325] Connected to WiFi
[21325] My IP: 192.168.0.22
[21325] Blynk v0.3.3
[21325] Connecting to cloud.blynk.cc:8442
[21593] Invalid auth token
The sketch
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include BlynkSimpleEsp8266.h
#include ESP8266WiFi.h
#include Adafruit_NeoPixel.h
#include SPI.h
#define PIN 12 // GPIO pin
#define NUMPIXELS 16 // Number of pixels in strip
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
char auth[] = "c63053c2a5834432b9f97e9fe2aa8858"; // You should get Auth Token in the Blynk App.
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, "UPC", "Test");
pixels.begin();
}
BLYNK_WRITE(V1) // Widget WRITEs to Virtual Pin V1
{
int R = param[0].asInt();
int G = param[1].asInt();
int B = param[2].asInt();
Serial.println(R);
Serial.println(G);
Serial.println(B);
for(int i=0;i<NUMPIXELS;i++){
// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, pixels.Color(R,G,B)); // Moderately bright green color.
pixels.show(); // This sends the updated pixel color to the hardware.
}
}
void loop()
{
Blynk.run();
}
Your token works for me. I see no errors related to your account. So I have feeling that actual connection to Blynk cloud is not happening. Does your ESP chip works without Blynk?
I am getting this error now as well. I am running with the cloud Blynk server at the moment. I was running several projects this morning with usual success, but this afternoon after creating 2 new projects I began receiving the “Invalid auth token” message. I tried logging off/on, refreshing tokens, etc., but no joy. I am using Arduino Mega HW with ethernet shield, a setup that has worked well for weeks. Any thoughts?
Dmitiry, a bit more info re my problem…same IOS projects/apps work fine on local Blynk server running on RPI. Still cannot get valid auth token to work when connecting to cloud Blynk.