I am no longer able to use IFTTT after I was successfully able to use it with another project. I went to create a new small project and cannot interact with IFTTT. I did notice that it is no longer the Spark channel, but rather the Particle channel. I disconnected and reconnected to the particle channel. My function are showing up, but i cannot get them to trigger when sending a text to them, like I could in the past.
I have read the posts regarding the fix and have tried everything on there with no luck. Any help will be much appreciated. Code below. THANK YOU!!
int relay = D1;
int lightOn(String command);
int lightOff(String command);
int led = D4;
void setup() {
Spark.function("on", lightOn);
Spark.function("off", lightOff);
pinMode(relay, OUTPUT);
pinMode(led, OUTPUT);
}
void loop() {
/*
digitalWrite(relay,HIGH);
delay(2000);
digitalWrite(relay, LOW);
*/
}
int lightOn(String command)
{
if(command == "on")
{
digitalWrite(relay,HIGH);
digitalWrite(led,HIGH);
}
}
int lightOff(String command)
{
if(command == "off")
{
digitalWrite(relay, LOW);
digitalWrite(led,LOW);
}
}
Please use this format to post code in discourse:
``` <-- insert this code
//paste code here
``` <-- insert this code