BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk Terminal does not show the reply from arduino

android

#8

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


#9

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.


#10

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");}

#11

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



#12

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


#13

Read this…


#14

@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.


#15

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


#16

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 );

#17

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


#18

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.


#19

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

#20

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


#21

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


#22

yes am using the key


#23

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");}

#24

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")

#25

Needs to be “hi waqar\n”


#27

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


#28

@waqar665 don’t forget this in your code.