Alex Wulff
Published © CC BY-NC-SA

Annoying Soil Moisture Sensor with Photon and IFTTT

Never forget to water your plants again with this extraordinarily annoying soil moisture monitor.

BeginnerFull instructions provided1 hour3,985
Annoying Soil Moisture Sensor with Photon and IFTTT

Things used in this project

Hardware components

DFRobot Piezo Buzzer
DFRobot Super-Bright LED
DFRobot Capacitive Soil Moisture Sensor
Particle Photon
DFRobot Micro USB Cable
Breadboard (generic)
Breadboard (generic)
Male-Male Jumper Wire


Read more



//AnalogRead on particle ranges from 0 to 4095, so the values for Arduino will be different

#define THRESHOLD           3000
#define SENSOR_PIN          A0
#define LIGHT_PIN           7
#define BUZZER_PIN          6
#define TEXTING_INTERVAL    1800000 //30 minutes (1000ms * 60s * 30mins)

int buzzerOn = 0;
int thresholdMet = false;
unsigned long lastTextTime = 0;

void setup() {
    pinMode(SENSOR_PIN, INPUT);
    pinMode(LIGHT_PIN, OUTPUT);
    pinMode(BUZZER_PIN, OUTPUT);

void loop() {
    if (analogRead(SENSOR_PIN) > THRESHOLD) {
        thresholdMet = true;
        digitalWrite(LIGHT_PIN, HIGH);
        digitalWrite(BUZZER_PIN, HIGH);
        unsigned long now = millis();
        if (now - lastTextTime >= TEXTING_INTERVAL) {
            Particle.publish("Water Me Now!");
    else {
        thresholdMet = false;
        digitalWrite(LIGHT_PIN, LOW);
        digitalWrite(BUZZER_PIN, LOW);


Alex Wulff

Alex Wulff

12 projects • 200 followers
I'm a maker and student at Harvard. I love Arduino, embedded systems, radio, 3D printing, and iOS development.


Add projectSign up / Login