Add details :
• Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
• Smartphone OS (iOS or Android) + version
• Blynk server or local server
• Blynk Library version
• Add your sketch code. Code should be formatted as example below.
Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.
Hello everyone
I have a problem with my project.
I connected a led strip to my esp8266 and assigned a switch to the virtual blink V4 port.
I then connected everything using this post
everything works but if I say twice “ok google switch on the lamp” the light switch off, not being a programming expert I don’t understand where I’m wrong. Who can help me?
Thanks for the reply
The problem I believe must be corrected by adding some code that returns the status of the V4 PIN to “0” so if I say “ok google switch on Lamp” the lamp stays on.
And this is my problem I don’t know where to look at the code and where to add something. Attached I inserted the trigger that I used.
Hi,
Sorry, Why you are using Body =[“1>600 ms delay>0”], it should be either [“0”] or [“1”]. If you are using active low design then it should be [“0”] only to keep it on.
Possibly the Blynk server reading the first byte only which is “1” in “1>600 ms delay>0” and updating V4=1 which results in powering off the relay/lamp. Just a wild guess.
I can’t solve, this is the code I used. Can you add anything in this code so that the light stays on when I say “ok google switch on lamp”?
Who can help me?
Thank you
"’
void aplyCmd()
if (lampStatus == 1)
{
Blynk.notify(“Life: Attenzione ==>> Luce accesa”);
digitalWrite(LAMP_PIN, HIGH);
if (!turnOffOLED) displayData();
LAMPs.on();
LAMPa.on();
}
else
{
digitalWrite(LAMP_PIN, LOW);
if (!turnOffOLED) displayData();
LAMPs.off();
LAMPa.off();
}
}
Please edit your post and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```