My project is garage door opener also it’s voice command opener .am using Amazon echo too .
I just need an LED to indicate if the door open or close or LCD to moniter in the blynk .how can I do that in Blynk am using button to open and close .
What should I add to my code to make it works
and how i can use the virtual PIN in blynk
And this is my code
// This #include statement was automatically added by the Particle IDE.
#include "blynk/blynk.h"
//#include "application.h"
#include "blynk/blynk.h"
#define GARAGE_ON D0
#define GARAGE_OFF D3
#define POWER D7
char auth[] = "xxxxxxxxxx";
void setup() {
//digitalWrite(POWER,HIGH);
Serial.begin(9600);
Blynk.begin(auth);
pinMode(GARAGE_ON,OUTPUT);
pinMode(GARAGE_OFF,OUTPUT);
pinMode(POWER,OUTPUT);
Particle.function("cloudFun1", fun1);
}
void loop() {
digitalWrite(POWER,HIGH);
Blynk.run();
}
int fun1(String args) {
digitalWrite(GARAGE_OFF, HIGH);
delay(500);
digitalWrite(GARAGE_OFF, LOW);
return 1;
}