Trey RevelsDoug Summers
Published

Your Wife is Hot!

Not hot like she looked at your browser history, hot as in temperature hot! This can be avoided with an A/C Condensate Monitoring System.

IntermediateFull instructions provided4 hours1,546
Your Wife is Hot!

Things used in this project

Hardware components

Photon
Particle Photon
×1
Safe_T_Switch
×1
Relay (generic)
×1

Software apps and online services

Maker service
IFTTT Maker service
ThingSpeak API
ThingSpeak API

Story

Read more

Schematics

A/C Condensate Monitoring with 2 Photons.

This is a simple Schematic depicting the wiring configuration.

Code

Condensate Monitoring Code

C/C++
The Same code was used on both Photon's for the sake of simplicity. The purpose of this project was to pass a variable between two Photons, to use one Photon wire the relay shield as shown in the schematic to the first Photon.
int digitalvalue;

void setup() {
    
    pinMode(D7,OUTPUT);
    pinMode(D1,INPUT);
    pinMode(A5,OUTPUT);
    
    
    Particle.variable("digitalvalue", &digitalvalue, INT);
    
    Particle.function("digitalvalue",digitalvalueToggle);

}

void loop() {
    
    digitalvalue = digitalRead(D1);
    
    delay(10000);
    
    if (digitalvalue==0) {
        Particle.publish("Drain","A/C is not Draining Properly!");
         digitalWrite(A5,0);
    }
    else if (digitalvalue==1) {
        Particle.publish("Drain","A/C is Draining Properly");
        digitalWrite(A5,1);
    } 
    
    

 
}

int digitalvalueToggle(String command){
    if (command=="on") {
        digitalWrite(D7,HIGH);
        return 1;
    }   
    else if (command=="off") {
        digitalWrite(D7,LOW);
        
        return 0;
    }
    else {
        return -1;
    }



int value= D1;
String data=String(value);


// Trigger the webhook
Particle.publish("Drain", data, PRIVATE);
// Wait 30 seconds
delay(30000);

      
}

    

Credits

Trey Revels

Trey Revels

1 project • 0 followers
Doug Summers

Doug Summers

1 project • 0 followers

Comments