Details-
• Arduino Mega 2560 with USB
• Android Oero
• Blynk server
The below I have posted a code. Basically, there are four traffic poles with three lights- Red, orange and greeN on each pole. I want to put a one second time interval to change from one light to the other. And, when I click on a button off all lights should get turned off. This is working on my Arduino when I was using RF module. But I have no idea how to do this with blynk. Please help me how to start or atleast suggest what changes needs to be done in my below arduino code
void loop()
{
///////// FIRST POLE///////////
digitalWrite(L1R, LOW);digitalWrite(L1G, HIGH);digitalWrite(L2R, HIGH);digitalWrite(L3R, HIGH);digitalWrite(L4R, HIGH);delay(1000);
digitalWrite(L1G, LOW);digitalWrite(L1O, HIGH);delay(500);digitalWrite(L1O, LOW);digitalWrite(L1R, HIGH);
///////////// SECOND POLE////////////
digitalWrite(L2R, LOW);digitalWrite(L2G, HIGH);digitalWrite(L1R, HIGH);digitalWrite(L3R, HIGH);digitalWrite(L4R, HIGH);delay(1000);
digitalWrite(L2G, LOW);digitalWrite(L2O, HIGH);delay(500);digitalWrite(L2O, LOW);digitalWrite(L2R, HIGH);
//////////////THIRD POLE////////////////
digitalWrite(L3R, LOW);digitalWrite(L3G, HIGH);digitalWrite(L2R, HIGH);digitalWrite(L1R, HIGH);digitalWrite(L4R, HIGH);delay(1000);
digitalWrite(L3G, LOW);digitalWrite(L3O, HIGH);delay(500);digitalWrite(L3O, LOW);digitalWrite(L3R, HIGH);
//////////////FOURTH POLE////////////
digitalWrite(L4R, LOW);digitalWrite(L4G, HIGH);digitalWrite(L2R, HIGH);digitalWrite(L3R, HIGH);digitalWrite(L1R, HIGH);delay(1000);
digitalWrite(L4G, LOW);digitalWrite(L4O, HIGH);delay(500);digitalWrite(L4O, LOW);digitalWrite(L4R, HIGH);
}