Hi, Im early stages of learning to use Blynk. I’m currently trying to learn how to use buttons etc. I’ve tried this example code to set up a basic step button on V1. The app just keeps saying the project is offline. I’m using an iPhone. Here is the code. minus my login details.
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "GSjesgIpM6IHhW17gWcPAXwf9wIC62Rp";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "";
char pass[] = "";
// This function will be called every time Slider Widget
// in Blynk app writes values to the Virtual Pin V1
BLYNK_WRITE(V1)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
// process received value
Serial.print(pinValue);
}
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}
void loop()
{
Blynk.run();
// You can inject your own code or combine it with other sketches.
// Check other examples on how to communicate with Blynk. Remember
// to avoid delay() function!
}
load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
[59] Connecting to BTHub6-P67Q
it made me realise it wasn’t connecting and only then did I realise (I’m embarrassed to say) I had made a typo on my SSID. I corrected it and now and it is connecting fine. Thanks again.
No problem!
I always like to use 74880 as my debug baud rate because you can see both the boot messages from the D1 Mini and the debug messages without having to switch rates in your serial monitor.