Things used in this project

Hardware components:
Photon new
Particle Photon
×1
Safe_T_Switch
×1
Relay (generic)
×1
Software apps and online services:
Q8wtlimqnp04fzhtr9v5
IFTTT Maker service
Hackster
ThingSpeak API

Schematics

A/C Condensate Monitoring with 2 Photons.
This is a simple Schematic depicting the wiring configuration.
Final circuit r8iyywfvkh

Code

Condensate Monitoring CodeC/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

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

ConnectTheDots with Particle Azure IoT Hub Integration
Intermediate
  • 598
  • 7

Protip

This project will allow you to connect your Particle device into an Azure IoT Hub for viewing data in real-time through an ASP.NET web app!

Other Clocks
Intermediate
  • 194
  • 3

Work in progress

A combination of 3 different clocks in one frame.

Christmas Gift Box
Intermediate
  • 3,604
  • 595

Full instructions

Christmas Gift Box plays music and sends an email when it is opened.

Weather Aware Sprinkler Controller
Intermediate
  • 1,321
  • 16

Full instructions

6 station Photon controller uses the Weather Underground API to prevent watering when windy, rainy, or too cold.

Simple Environmental Monitoring
Intermediate
  • 1,613
  • 13

Full instructions

Particle Photon circuit allowing the display of environmental conditions (light, temperature, humidity, pressure) using the Blynk app.

THDweeter
Intermediate
  • 253
  • 2

Protip

Yet another temperature-humidity sensor publishing to dweeter, with WiFi auto-disconnect and a push button to read daily max and min values.

Add projectSign up / Login