Email and text notifications

I am having trouble with what I think should be a simple task.

What I have is a float switch that will tell me if there is water is in my basement connected to Pin D1. I have it set up now that if pin D1 goes HIGH it will blink a LED. What I would like it to do also is send me a text and email if pin one goes HIGH or LOW. I have spent hours looking at IFTTT and Photon programs and cant get to a point that I can understand them to get them to work together.

Thanks,

Doug H.

void setup()
{
pinMode(D0, INPUT); // Configure D0 as an input
pinMode(D1, OUTPUT); // Configure D1 as an output
}

void loop()
{
// Read the switch connected to D0
if(digitalRead(D0) == 0)
{
for(int i = 0; i < 10; i ++)
{
// Flash the LED 10 times
delay(300);
digitalWrite(D1, HIGH);
delay(300);
digitalWrite(D1, LOW);
}

    //  delay!
    delay(300);
}
else
{
    // Do nothing, the LED is unpressed!
}

}

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.