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

And gate is not working Node-red

Hi I’m using blynk write node where when i press button it changes from 0 to 1 vice versa

and also the other inject node which is in 1 but the and logic is not giving me true value when both are 1.

blynk property is :-
image

and inject node property is :-

Just because you’ve called a Switch node an “And Gate” doesn’t mean that it will behave like an And Gate.

I’m still running version 0.20 of Node-Red, so I don’t know how the changes to sequential processing in v1.0 of Node-Red affect things, but certainly in v0.20 it’s not possible to compare two inputs using a Switch node.
To begin with, both inputs aren’t likely to arrive at exactly the same time using your flow, so a method of storing the values is needed.

I’d approach this by storing the values from the two input nodes as variables, then gave a function, which is triggered by the two inputs, which reads and compares the variable values and takes the appropriate action.

Pete.

opps! I’m sorry to add it’s pic! Here it is

Link for AND node

Currently I’m using set topic for blynk input and it is working for some times

after that giving one input true it turns on
image