I gave up to use wemos d1 with blynk.
It does not connect to the blynk server when I use blynk timer.
I have NodeMCU, so its time saving to move further with nodecmu. wemos d1 wasted
long time and money,
exactly 1 year ago I bought my first board as wemos d1
simple examples works but complicated other people code was not working with wemos d1, that i did not know and wasted time. // for newbies GPIO and silkscreen is comfusing/// Dx was solution but still not recommended, read GTT;s comment, who explained well. now I understan how to use GPIO pin numbering thanks man.
later on I bought Uno and every code works fine.
finally, I bough nodemcu now, bcz I want my control over wifi, wifi module can be solve my prolem , but i just want to use controller which has own wifi. I am planning to do it like 10 or 20, so all my friends could use their phone to control curtains and light, so thinking of expanse, I want controller it has own wifi
Anyway. I am not spending my all time with arduino, bcz other things to do.
thats why i am taking 1 year to finish my project, also noob , I needed to read every thing
like LED legs, if or while loop, so on
Thanks community, If you`are reading until here my post and also if you have wemos d1 retired board, please try this sketch and see if that connect to Blynk server,
Thanks guys,
I will post my next post soon, I hope my all code will work with NodeMCU
which post will be about
- dc motor position. speed controlling
- DIY encoder
- PID controller
- L293D
- safely using relays
- what else I learn in one year?
- ah, maybe dvd step motor used small cnc
- and other sensors
when I post my next post or question I will leave link here.
Happy blynk guys, not with wemos d1, I will suggest you trow it out, as I already pack it for long time kkep, one day i will use it, dont know yet the application.
THE code, which is not working with wemos d1
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char auth[] = "hWc7ssssssssssssssssssssssssiIN3dFt";
char ssid[] = "issssssssa";
char pass[] = "Mssssss2*";
#define LEDgreen 12
#define LEDred 13
void mycode1()
{
digitalWrite(LEDgreen, !digitalRead(LEDgreen)); // Reads current state and sets to opposite state
digitalWrite(LEDred, !digitalRead(LEDred)); // Reads current state and sets to opposite state
}
void setup()
{
// Debug console
Serial.begin(9600); // you can change if you want , with nodemcu 74880
pinMode(LEDgreen, OUTPUT);
pinMode(LEDred, OUTPUT);
digitalWrite(LEDgreen, HIGH);
digitalWrite(LEDred, HIGH);
Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8080);
timer.setInterval(1000L,mycode1);
}
void loop()
{
Blynk.run();
timer.run();
}