Level output and relay

Hello
I have a problem with blynk and Wemos D1 mini.
I want to control 5 relays.
But I find on the net only cards with relays to command by low level.
I don’t know why, on one card with one relay it is command by high level and many relays on a card it’s always command by low level.
I wan’t to configure with push button.
Level 1 to 0 in my case.
And when I start my card wemos and when connection is ok all my relays works.
I must to send a command with push button by blynk for my relay let fall.
I don’t find this problem on differents forums.
I don’t want add component.
How I can do it (by code ?) for works correctly
Excuse for my language I’m French.
Thank you for your answers.
Bruno

Trying to understand your question a little better. Are you asking how to control a high level relay with BLYNK button?
You can edit the value the button sends in the widget settings.

you can try that

#define RelayOn LOW
#define RelayOff HIGH

else you can edit button as @Toro_Blanco said.
05-024052

Thanks for you answer
But your solution does not work.
Or I do not understand very well because on your photo, you take a virtual pin. I use a digital pin.
Otherwise
I have find an order to be put in the code of installation
Blynk. Sync All ();
it is better but when I begin there is always an impulse of my relays during some ms. And it is not good for my project.

Using digital/analog pins directly from the App will limit what you can do… Virtual pins give more flexibility and will allow such commands as the Blynk.syncAll()

http://help.blynk.cc/getting-started-library-auth-token-code-examples/blynk-basics/what-is-virtual-pins

As for the photo example given… whether using digital or virtual pin the 1 & 0 can be reversed to 0 & 1 if you want to send a LOW signal when pushing the button instead of a HIGH signal.

This is due to the fact that some ESP pins boot HIGH then go LOW, some boot LOW then go HIGH… this has nothing to do with Blynk…

1 Like