Before creating the topic
- Search forum for similar topics
- Check http://docs.blynk.cc and http://help.blynk.cc/✅☑️
- Add details :
• Hardware model + communication type. esp8266 with wifi
• Smartphone OS (Android)
• Blynk server
• Blynk Library version 1.0.0
• Add your sketch code. Code should be formatted as example below.
Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.
//
//// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLxxxxxx"
#define BLYNK_DEVICE_NAME "Device"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG
#define APP_DEBUG
// 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
#include "BlynkEdgent.h"
void setup()
{
Serial.begin(115200);
delay(100);
BlynkEdgent.begin();
}
void loop() {
BlynkEdgent.run();
}
BLYNK_WRITE(InternalPinMETA) {
String field = param[0].asStr();
Serial.println(field);
if (field == "Location") {
String value = param[1].asStr();
Serial.println(value);
// Do something with Metadata value
}
}
BLYNK_CONNECTED() {
// Send requests for different metadata
Blynk.sendInternal("meta", "get", "Location");
// Blynk.sendInternal("meta", "get", "Device Model");
}
metadata setup
as per my knowledge
BLYNK_WRITE
runs when we write any data to it
but in case of metadata when i change it does not update and i have to reboo the board
thanks