BLYNK_WRITE() with keypad

• Hardware model: ESP32 NodeMCU-32S
• Communication type: WiFi
• Android
• Blynk server
• Blynk Library version: Newest
• Keypad Lib: http://playground.arduino.cc/Code/Keypad

I want use keypad 4x4 in BLYNK_WRITE(), can it not?
V12 is integer, min 0 and 1; Button link with V12 is push mode
In Serial Monitor, if I press Button ( on Blynk app I see “V12 has change value” but when I press keypad, I cant see anything

BLYNK_WRITE(V12){
  int stt0 = param.asInt();
  if (stt0==1){
    char key = keypad.getKey();
    Serial.println("V12 has change value");
    if(key){
      ip_password = "";
      ip_password += key;
      Serial.println(key);
      lcd_i2c.setCursor(ip_password.length(), 1);
      lcd_i2c.print('*');
      if (key=='#'){
        password=ip_password;
        lcd_i2c.clear();
        lcd_i2c.setCursor(0, 0);
        lcd_i2c.print("PASSWORD");
        lcd_i2c.setCursor(0, 1);
        lcd_i2c.print("SAVED");
      }
    }
  }
}

BLYNK_WRITE(vPin) is a callback that is triggered by the Blynk server whenever the value of a virtual datastream changes.
This change is normally triggered via a widget on either the mobile or web dashboard, but can also be triggered by an HTTP(S) API call.

You can’t trigger that change from a hardware device, unless that hardware uses the HTTP(S) API.

Pete.

1 Like

Thank you