I am attempting to run a 2 Channel Relay via a Particle Photon and Blynk to open my garage door opener. Every once in a long while, I hear a click on the relay, but usually all I see is one of the onboard LEDs on the relay turning off and then on when I release the button in Blynk.
- Particle Photon is setup on WiFi. Through Blynk I am able to turn the onboard LED on D7 on and off so I know the Photon is on the network.
- I connected the 5v 2 Channel Relay up to the Photon and am able to make both of the LEDs on the 2 Channel Relay turn on/off by setting up buttons on Blynk for D1 and D2 but I cannot get the relay to send a signal to the garage door opener.
I have wired the relay module to the Particle Core in the following way:
GND to GND (violet wire)
IN1 to D0 (yellow wire)
IN2 to D3 (purple wire)
VCC to 3V3 (red wire)
In Blynk I have setup the app to use a button assigned to D0 and the code flashed to my Photon is as follows:
// This #include statement was automatically added by the Particle IDE.
#include “blynk/blynk.h”
// #include <SPI.h>
// #include <Ethernet.h>
// #include <BlynkSimpleEthernet.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “”;
// My actual Auth Code from the Blynk app is inserted above
void setup()
{
Serial.begin(9600);
Blynk.begin(auth);
pinMode(D0, OUTPUT);
// You can also specify server.
// For more options, see Transports/Advanced/CustomEthernet example
// Blynk.begin(auth, “server.org”, 8442);
// Blynk.begin(auth, IPAddress(192,168,1,100), 8888);
}
void loop()
{
Blynk.run();
}
Any help in getting this relay to work via Blynk would be greatly appreciated.
