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

IFTTT’s Maker channel with PHPoC Blue.
Intermediate
  • 65
  • 3

This project shows how to use IFTTT maker channel.

Drop of Life
Intermediate
  • 629
  • 17

Full instructions

A display to remind me when I can donate blood and save lives, powered by the Red Cross API and Particle.

Alexa Trigger ESP8266
Intermediate
  • 1,487
  • 13

Work in progress

Use Alexa to voice control a relay connected to the Internet via ESP8266-01.

IoT Drone - Part 2 - Sensors
Intermediate
  • 357
  • 4

Work in progress

Part 2 incorperates a GPS receiver, 10 DOF IMU, and Ultrasonic distance sensor to be used for flight controls.

How to run Particle on Raspberry Pi (Headless on Pi Zero W)
Intermediate
  • 1,603
  • 18

Protip

Use the most popular single-board computer with the most popular IoT tools.

Wireless Tank and Pump Monitoring System with Mobile App
Intermediate
  • 482
  • 3

Particle and Blynk to wirelessly monitor a 4,000 gallon water distribution system.

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback