Arduino uno Bylnk relay issue

Hi im newbie

I have 8ch relay board and arduino uno. i want turn on 8 relay alone. but once i press button on app relay turn off when press app button off relay get on.

please help me. I dnt know much about arduino.

my code
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <UIPEthernet.h>
#include <BlynkSimpleUIPEthernet.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “xxxx”;

void setup()
// You can also specify server.
// For more options, see BoardsAndShields/Arduino_Ethernet_Manual example
//Blynk.begin(auth, “”, 8442);
// Blynk.begin(auth, IPAddress(192,168,1,100), 8888);

void loop()

@manju850 A lot of relay boards are wired such that sending digitalWrite(pin, LOW) signal actually activatea the relay and vice versa. Change all the HIGHs in your code to LOWs and LOWs to HIGHs and see what happens.

Edit. If you’re using the push button in the app, you’re going to need to probably use virtualpins.

So in your code do something like…:

int button = digialPinyouwanttoUse

Void setup{

Pinmode(digialPinyouwanttoUse, OUTPUT)
digitalWrite(digialPinyouwanttoUse, HIGH)

digialPinyouwanttouse = param.asInt()

1 Like

hello zeeko

i dont know how to use this virtual pin ? could you plz explian?

There are a ton of topics on this- use the amazing search function first.

I’ll give you a place to start: