Blynk Terminal does not show the reply from arduino

Just switch it to Blynk green on Blynk green… if you need a bug, make it a promotional one :stuck_out_tongue:

1 Like

I wonder… is the Terminal Widget one of those that needs a server connection from the device? As this OP is using a BT/BLE library.

Gunner the code u sent works when its just ur code, when i put it in my code it does not work.
look at the code here. Waqar and maxi are integer i assigned, and the Waqar which has virtual does not sent the reply to the app, while the maxi one which i assigned a command for serial do show its reply in Arduino ide software in laptop.

BLYNK_WRITE(V4)
{ if (param.asInt()==waqar)
{ Blynk.virtualWrite(V1, "hi waqar");
}
 
 else if (param.asInt()==maxi) 
{Serial.println(param.asInt());
  Serial.println("max how r u");}

Again… format your posted code properly.

Blynk - FTFC

And terminal text needs parameter as string, not integer.

param.asStr()


http://docs.blynk.cc/#blynk-firmware-virtual-pins-control

image


gunner the integer is just an input, if the statement is correct the terminal has to write what ever it is told,
and i didn’t understand what are you saying about the format thing,
on ur code i write the same as my code,look, but it works in yours and not in mine,

BLYNK_WRITE(V1) // Terminal Input Function
{
  String Termtext = param.asStr();
  Blynk.virtualWrite(V1, "hi waqar");

in my code i also wrote “hi waqar” as in yours

Read this…

@waqar665 your last piece of code was serial.print() did you mean to put terminal.print()?

If you did you also need terminal.flush().

We would need to see your buggy code to fix it.

ohh i got what u r saying, so did u got my question?

But you are missing the part the parrots the text you typed…

Yours…

Blynk.virtualWrite(V1, “hi waqar”);

Mine…

Blynk.virtualWrite(V1, "You typed "+Termtext );

i don’t want to see the text i sent, i just send a code. if it verifies it will give me reply "hi waqar so the last string in ur code should be removed

I was using that as an example… I don’t know what you want to send to your terminal :stuck_out_tongue_winking_eye: But you would send it as a “string” or variable.

look that’s the code i did changing in urs and it still works

{
  String Termtext = param.asStr();
  Blynk.virtualWrite(V1, "hi waqar");

but mine is 

```BLYNK_WRITE(V4)
{ if (param.asInt()==waqar)
{ Blynk.virtualWrite(V1, "hi waqar");
}

but the mine one does not work.. look at the command it is the same but ur works in simple project and mine one not

Also… your quotation marks look strange (compared to my copy pasted code)…

Blynk.virtualWrite(V1, "You typed "+Termtext );

… are you using the quotation key?

image

And @Gunner told you why it doesn’t work. V4 terminal is not working with int.

yes am using the key

look the serial display works as i write in command but the msg in 1st statement does not show on terminal what is the error

{ if (param.asInt()==waqar)
{ Blynk.virtualWrite(V4, "hi waqar");
}
 
 else if (param.asInt()==maxi) 
{Serial.println(param.asInt());
  Serial.println("max how r u");}

BECAUSE… text you type into the terminal is a string… but you are looking for an integer… thus it will never complete the if() argument.

You would use this instead… and don’t forget the quotes :wink:

if (param.asStr()=="waqar")

Needs to be “hi waqar\n”

Just show us the whole, updated, buggy code again… (format it after pasting here :stuck_out_tongue_winking_eye: )

@waqar665 don’t forget this in your code.