HELP code for blynk app

HI GUYS

I’M DOING A SMAL PROJECT, MY PROJECT CONSISTS IN CONTROL LIGHTS OF MY ROOM THROUGH BLYNK AND THROUGH MANUALLY PUSH BUTTON. I’VE DONE CODE FOR ARDUINO BUT I HAVEN’T IDEA TO MAKE THIS CODE FOR BLYNK APP.

CAN SOME ONE COMPLETE THIS CODE PLEASE FOR BLYNK APP + ARDUINO + ETHERNET

I HAVE INSTALED ALL LIBRARIES

HERE IS MY CODE

int PUSHBUTTON = 2;
int PUSHBUTTON_BLYNK = 8;
int bulb = 3;
bool val = 0;
bool val2 = 0;
bool val3 = 0;
bool oldval = 0;
bool state = 0;

**void setup()**
{
  pinMode(bulb,OUTPUT);
  pinMode(PUSHBUTTON,INPUT);
  pinMode(PUSHBUTTON_BLYNK,INPUT);
}

**void loop()**
{
val = digitalRead(PUSHBUTTON); 
val2 = digitalRead(PUSHBUTTON_BLYNK); 
val3= val || val2;
if ((val3 == HIGH) && (oldval == LOW))
{
state = 1 - state;
delay(10);
}
oldval = val;
if (state == 1) 
{
digitalWrite(bulb, HIGH); 
} else {
digitalWrite(bulb, LOW);
}
}

@mxhsnblynk I suggest you do a bit of reading on how BLYNK works, and how to implement it into your code. Start by looking at the GETTING STARTED section, and reading through the DOCS. Then try a few of the examples provided in the SKETCH BUILDER. Once you have a feel for how things function with BLYNK, how to finish your project may be a bit clearer.

If you are just looking for someone to write the code for you, GOOD LUCK.

If you work your way through the examples in SKETCH BUILDER, pay close attention to the ones listed under MORE. The code you seek is there.

1 Like

Sorry, that is NOT the purpose of this forum. We will help you as you learn, but you must do the work.

1 Like