BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

BlynkEdgent. How to change the network name and password WiFi

ESP8266
BlynkEdgent lib

There is code that works great, but I need to change the WiFi network, where you set the network name and password of the WiFi network in the BlynkEdgent configuration files?


#define BLYNK_TEMPLATE_ID "TMPLxxxxxxxx"
#define BLYNK_DEVICE_NAME "DEVICE NAME"
#define BLYNK_FIRMWARE_VERSION        "1.0.1"

#define BLYNK_PRINT Serial
#define BLYNK_DEBUG
//#define APP_DEBUG
#define USE_NODE_MCU_BOARD

#define blynkVirtualPin_1                   V0
#define blynkVirtualPin_2                   V1
#define blynkVirtualPin_3                   V2
#define blynkVirtualPin_4                   V3
#define blynkVirtualPin_5                   V4
#define blynkVirtualPin_6                   V5
#define blynkVirtualPin_7                   V6

const uint8_t pinPowerKey[]                 = {16,5,4,14,12,13,15};
const uint8_t countPowerKey                 = sizeof(pinPowerKey);

#include "BlynkEdgent.h"

BLYNK_CONNECTED()
{
  Blynk.syncAll();
}

BLYNK_WRITE(blynkVirtualPin_1){ if(param.asInt() == HIGH) digitalWrite(pinPowerKey[0], HIGH); else digitalWrite(pinPowerKey[0], LOW); }
BLYNK_WRITE(blynkVirtualPin_2){ if(param.asInt() == HIGH) digitalWrite(pinPowerKey[1], HIGH); else digitalWrite(pinPowerKey[1], LOW); }
BLYNK_WRITE(blynkVirtualPin_3){ if(param.asInt() == HIGH) digitalWrite(pinPowerKey[2], HIGH); else digitalWrite(pinPowerKey[2], LOW); }
BLYNK_WRITE(blynkVirtualPin_4){ if(param.asInt() == HIGH) digitalWrite(pinPowerKey[3], HIGH); else digitalWrite(pinPowerKey[3], LOW); }
BLYNK_WRITE(blynkVirtualPin_5){ if(param.asInt() == HIGH) digitalWrite(pinPowerKey[4], HIGH); else digitalWrite(pinPowerKey[4], LOW); }
BLYNK_WRITE(blynkVirtualPin_6){ if(param.asInt() == HIGH) digitalWrite(pinPowerKey[5], HIGH); else digitalWrite(pinPowerKey[5], LOW); }
BLYNK_WRITE(blynkVirtualPin_7){ if(param.asInt() == HIGH) digitalWrite(pinPowerKey[6], HIGH); else digitalWrite(pinPowerKey[6], LOW); }

void setup()
{
  Serial.begin(115200);
  delay(1000);

  for(uint8_t i=0; i<countPowerKey; i++){ pinMode(pinPowerKey[i], OUTPUT); digitalWrite(pinPowerKey[i], LOW); }

  BlynkEdgent.begin();
}

void loop()
{
  BlynkEdgent.run();
}

Thank you in advance!

You don’t. You provision or re-provision the device via the app.
Normally, you clear the stored credentials by pressing the button on the board for 10 seconds. in your case, with a NodeMCU, this means pressing the button to the right of the USB connector for 10 seconds.

After that, you can open the app, press the “+ Add Device” button in the app to re-provision the board.

You can also clear the device credentials by pressing the three dots in the top right of the device screen twice, then choosing “Reconfigure”.

Pete.