Problem with timer widget

Hello to everyone,
i’m using the timer widget with the following codes:

BLYNK_WRITE(V7)
{
  int tempo=param.asStr();
  Serial.print("Got a value: ");
  Serial.println(tempo);
}

but in the serial monitor i see: “Got a value: 8611”

the codes works only like this:

BLYNK_WRITE(V7)
{
  Serial.print("Got a value: ");
  Serial.println(param.asStr());
}

Why?

Thanks

I think that’s your problem.

Pete.

Yes but i want to something like this…

BLYNK_WRITE(V7)
{
  int tempo=param.asStr();
  Serial.print("Got a value: ");
  Serial.println(tempo);
if (tempo==HIGH).....
else....

}

But it doesnt’t work…

type mismatch

String tempo=param.asStr();
1 Like

Perfect… Thanks

1 Like