Hello,
I install Blynk yesterday on my Raspberry Pi 3. On my Pi, i have the server and the project. I want to connect the project to the server in localhost, as I made few mounth ago (Blynk 0.5.0). But, with the same technic, it didn’t work :
[2] Connecting to localhost:80 [3] Can't connect to localhost [2009] Login timeout
I don’t remember if I did something special the first time.
This is the code, I use the default one with the server change.
#define BLYNK_PRINT stdout
#ifdef RASPBERRY
#include <BlynkApiWiringPi.h>
#else
#include <BlynkApiLinux.h>
#endif
#include <BlynkSocket.h>
#include <BlynkOptionsParser.h>
static BlynkTransportSocket _blynkTransport;
BlynkSocket Blynk(_blynkTransport);
static const char *auth, *serv;
static uint16_t port;
#include <BlynkWidgets.h>
BLYNK_WRITE(V1)
{
printf("Got a value: %s\n", param[0].asStr());
}
void setup()
{
Blynk.begin(auth, "localhost");
}
void loop()
{
Blynk.run();
}
int main(int argc, char* argv[])
{
parse_options(argc, argv, auth, serv, port);
setup();
while(true) {
loop();
}
return 0;
}
I hope someone can help me.
Thanks !