Ifttt + 4 relay shield


#1

hello
im looking for a library to use IFTTT with the 4 relay shield
is this library the one?

internet_Relays.cpp

thanks


#2

Have you tried it? No reason it shouldn’t work.


#3

No Sir
I needed previous confirmation before buying the boards.


#4

You don’t really need any library to have IFTTT talk to the Particle devices - it’s all in the stock APIs


#5

Sorry, I meant if its the correct library to control relays over internet


#6

The library for the relay shield is here
https://build.particle.io/libs/RelayShield/0.0.6/tab/RelayShield.cpp

But for that too: No library actually needed.
The relays are connected to the following pins

#define relay1 D3
#define relay2 D4
#define relay3 D5
#define relay4 D6

And with that you just use pinMode() and digitalWrite() as you’d do with any other GPIO manipulation.


#7

is any complete library ready to use ? im not (yet) a programming code guy !


#8

Hmm, even using a library does also require some basic programming - or are you asking for a ready-to-use solution for your particular problem?


#9

I normally use NCD boards with their standard library.
I just wanted to try particle shield board and be sure I can use internet relays for a standard online+ifttt use.


#10

The Particle Relay Shield is a lot easier to control than the NCD’s.

void setup() {
  pinMode(D3, OUTPUT);
}

void loop() {
  digitalWrite(D3, !digitalRead(D3));
  delay(1000);
}

This is all you need to have Realay 1 toggle on/off every second.