blynk terminal does not show the data or reply from the Arduino, even i uploaded the example available in Blynk examples. so i added the serial print, so it shows on serial but not on tha Blynk app.
#define BLYNK_PRINT Serial
#include <SoftwareSerial.h>
SoftwareSerial DebugSerial(2, 3);
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
char auth[] = "f4b1b8ee6a0b4ad4af0602b04b3afe1d";
WidgetTerminal terminal(V1);
BLYNK_WRITE(V1)
{
// if you type "Marco" into Terminal Widget - it will respond: "Polo:"
if (String("Marco") == param.asStr()) {
terminal.println("You said: 'Marco'") ;
terminal.println("I said: 'Polo'") ;
Serial.println("you said marco") ;
Serial.println("i said polo") ;
} else {
// Send it back
terminal.print("You said:");
terminal.write(param.getBuffer(), param.getLength());
terminal.println();
}
// Ensure everything is sent
terminal.flush();
}
BLYNK_WRITE(V2)
{int pinValue = param.asInt();
Serial.println(pinValue);
}
void setup()
{
DebugSerial.begin(9600);
Serial.begin(9600);
Blynk.begin(Serial, auth);
}
void loop()
{
Blynk.run();
}
Guess you didn’t read all those directions you had to delete in order to put your question in this topic … I fixed your code formatting for you this time.
OH Wait!!.… also, if you are using an Android phone… there is a bug (still not fixed @BlynkAndroidDev ) wherein the terminal defaults to Black text on Black background… so everything is working, you just can’t see it
Just click on the Text button to fix it…
PS, you can also simply send data with a Blynk.virtualWrite(V1, "Print this on the Terminal") command. In many ways it works much better then the dedicated terminal commands… try it out.
@wanek This OP’s issue is unlikely a bug topic (assuming colours were changed ) I already changed it from that to a normal “help topic”'… I use terminal in a few different projects and it works perfectly fine… And already tagged a developer about the text (and in other topics as well).
@waqar665 Lets focus on what other (if any) examples and code you have tried.
When you enter text into the terminal input and press enter, do you see what you typed mirrored back, preceded by the > ?
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");}
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,
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
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