Hello All
First of all, I am very new to using arduino and blynk.
I have a problem with the terminal widget and I couldn’t find a similar topic maybe because it might be a stupid question.
However, here is my problem. I want Blynk to send a message on terminal. I am working on a laser tripwire and want it to write “Alarm!” when the alarm is triggered.
Before including the terminal code into my program I was trying some stuff with the widget but I have the problem that the message gets send infinitly. For this experiment I have 2 LEDs and I want terminal to just send the message once and not repeat it every loop. How can I fix this?
Edit: I know I can use notify for this case, but then I would have the same problem having never ending notifications.
Why I need terminal specificaly is that I want it to give a message like “Alarm! Type in Password here to deactivate”
void test()
{
int digitalValue = digitalRead(greenled);
if (digitalValue == LOW) {
digitalWrite(redled,HIGH);
terminal.println(F("Alarm!"));
terminal.flush();}
else {
digitalWrite(redled,LOW);}
}