• esp8266 model 12f
• Smartphone Android
• Blynk server
• Blynk Library version 0.6.1
The problem is that the pin get a wrong value. If the button value is 0 the pin write the value of HIGH, but if the button value is 1 the pin write the value of LOW.
Please help me.
//#define BLYNK_PRINT Serial
//#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
int start = 2;
const char id[3][33] = {"4t1JI2E99LIKx_VTT8nNa3uI1D0fLK_Y", "Fibertel WiFi381 2.4GHz", "0042071630"}; //solo reconoce bandas de 2.4GHz
WiFiClient client;
BLYNK_WRITE(V0){
int status = param.asInt();
if (status == 1) {
digitalWrite(start, HIGH);
}else {
digitalWrite(start, LOW);
}
delay(200);
}
void setup() {
Serial.begin(9600);
Blynk.begin(id[0], id[1], id[2]);
delay(10);
pinMode(start, OUTPUT);
}
void loop() {
Blynk.run();
}