Easy Blynk Programming

Blynk is very good platform to work in IOT. I have a Idea for Improving simplicity of software Programming. I have connected 2 channel Relay to the arduino and it worked properly, Now if I have to connect Bluetooth to it, have to change program.

I wish if there is feature available where I will keep my relay program same and for connecting blutetooth, the additonal program just to add over it,
For Example-

void setup() {
  
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
}

void loop() {
 
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
delay (5000);
digitalWrite(8,LOW);
digitalWrite(9,HIGH);
delay (5000);
}

/*with bluetooth*/

Void Bluetooth()

{ Virtual Pin 8 = Digital Pin 8
Virtual Pin 9 = Digital Pin 9
Serial band width = 9600
/*and other essential things important to the additional program*/
}

void setup() {
  
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
}

void loop() {
 
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
delay (5000);
digitalWrite(8,LOW);
digitalWrite(9,HIGH);
delay (5000);
}

/*Same For WIFI
Instead of bluetooth we should only replace word Wifi
and other program remains same*/
Void WIFI()

{ Virtual Pin 8 = Digital Pin 8
Virtual Pin 9 = Digital Pin 9
Serial band width = 9600
/*and other essential things important to the additional program*/
}
void setup() {
  
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
}

void loop() {
 
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
delay (5000);
digitalWrite(8,LOW);
digitalWrite(9,HIGH);
delay (5000);
}

@sf2020 please edit your post (using the pencil icon at the bottom) and add triple backticks at the beginning and end of each of your two sections of code so that the code displays correctly.

Triple backticks look like this:
```

Pete.

1 Like

Edited

What is your question? :thinking:

Nice!

http://help.blynk.cc/getting-started-library-auth-token-code-examples/blynk-basics/keep-your-void-loop-clean

Pete.

There’s nothing about blynk :scream:

1 Like