1

I have a problem in sending numbers from blynk terminal to arduino serial monitor. When I send any number from blynk terminal the arduino always getting 1. How can I get any number please help me. Thank you.

Here's my code

BLYNK_WRITE(V0){
  int pinValue = param.asInt(); // Int Value
  String i = param.asStr(); //String Value
  Serial.println(pinValue);

if(i == "A"){ Serial.println("Ready to enroll a fingerprint!"); Serial.println("Please type in the ID # (from 1 to 127) you want to delete...");

  Blynk.virtualWrite(V0, "Ready to enroll a fingerprint!");
  Blynk.virtualWrite(V0, "Please type in the ID # (from 1 to 127) you want to save this finger 
  as..."); 

  uint8_t num = 0;

    while (num == 0) {
      while (! Serial.available());
      num = Serial.parseInt();
    }
  Serial.print("Enrolling ID #");
  Serial.print(num);

} }

The value output of num is always 1 even I sent a different number.

Time Gold
  • 103
  • 1
  • 6

0 Answers0