Our previous code without OTA (over the air) updates works great. Now we want te be able to update via OTA.
I used the Blynk.Edgent example. I implemented our code in the Edgent. It looks to work okay but when i try to get my phone connected to the Wemos it wont so. I get an error on my phone: Cant connect to this network. Then i tried to use just the Edgent example code and got the same problem/error.
Is there a way to solve this or is there a way to bypass the mandatory connection to the phone before it connects with the WiFI?
The pins i am using are:
D1: Relais shield
D4: PWM singal for fans
D6: DHT22
D7: DHT22
D8: DHT22
I am not using a physical button
I did not define these pins in the Settings.h but in the main file. Also i did uncommend our board in the main file.
I do mean the Blynk.Air option.
The problem i am facing is when you start the Wemos with the edgent it will make its own “network” You need to connect to that network via the app. But when i try to connect, my phone gives me an error saying: Cant connect to this network.
When i pre-define the Wifi credentials in the main file (as i am doing with my non OTA code) it still wants me to connect to its own network before it will connect to Wifi.
You need to un-comment #define USE_WEMOS_D1_MINI in the main .ino file…
// Uncomment your board, or configure a custom board in Settings.h
//#define USE_SPARKFUN_BLYNK_BOARD
//#define USE_NODE_MCU_BOARD
//#define USE_WITTY_CLOUD_BOARD
//#define USE_WEMOS_D1_MINI <<<<<<<<<<<<<<<<<<<<<<<<<<<<
That will enable this part of the Settings.h configuration file, rather than the custom board configuration…
I did uncommend #define USE_WEMOS_D1_MINI in the main file.
I will try to connect the button.
But is there a way to bypass the need of first connecting to the “network” of the wemos and than filling in the wifi credentials via the phone app? (shown in the youtube link at 10.16)
With my “normal” code you define the Wifi credentials and it will connect to that network.
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = ".....";
char pass[] = "......";