Things used in this project

Hardware components:
Photon new
Particle Photon
×2
Adc121c021 pizo 1
ControlEverything.com Piezo Sensor
×1
11026 02
Jumper wires (generic)
×5
12002 04
Breadboard (generic)
×2
aluminum foil
×2
Software apps and online services:
Q8wtlimqnp04fzhtr9v5
IFTTT Maker service
Microsoft Excel

Schematics

A piezo buzzer receives a signal from the photon when the switch sensor is disconnected.
Screen shot 2017 04 12 at 7 57 51 pm zr9roety9c
Switch
The switch seen here is representative of the aluminum foil, two wires and adhesive strips that were used instead.
Screen shot 2017 04 12 at 7 58 14 pm rc1yiyz5h8

Code

Switch CodeC/C++
int PIRSensor = D1;
//int state=0;
void setup(){
pinMode(D7,OUTPUT);
pinMode(PIRSensor,INPUT_PULLUP);
}

void loop() {
    
  if (digitalRead(PIRSensor) == HIGH)
  {
       digitalWrite(D7,1);
       Particle.publish("pesky_thief","caught");
       //state = !state;
       delay(900);
       digitalWrite(D7,0);
  }
    delay (500);
}
Buzzer CodeC/C++
int buzz = D0;
int state = 0;
int led = D7 ;
void setup()
{
    pinMode(buzz,OUTPUT);
    digitalWrite(buzz,LOW);
    
    Particle.subscribe("pesky_thief",peach,"2f002e000a47333439313830");
}
void peach (const char *event, const char *data)
{
    
    if (strcmp(data,"caught")==0)
    {
        digitalWrite(buzz,HIGH);
    delay(100);
    digitalWrite(buzz,LOW);
    }
} 
void loop()
    {
        
    }

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

Well House Temperature Manager
Easy
  • 239
  • 6

Full instructions

Monitors the temperature of the well house to prevent the well from freezing.

Drink Alert!!! (Beverage Can Monitor)
Easy
  • 281
  • 4

Full instructions

Tired of going to grab a soda only to find they're all gone!? Well now you have an alert system to let you know when you need to refill.

Using the mcPlug for IoT applications!
Easy
  • 353
  • 7

Full instructions

Using MQTT, Losant, IFTTT and the mcThings IoT platform to create feasible and real IoT automation solutions with the mcPlug

Happy Wife =  Happy Life
Easy
  • 228
  • 3

Full instructions

Wife not a morning person? Improve your life by improving your wife's temperament in the morning. Fresh coffee makes wife happy!

Happy Wife = Happy Life

Team We Are Not Coders

Temperature Sensor
Easy
  • 332
  • 5

Full instructions

A photon that measures the temperature and humididty with a DHT 22 sensor and communicates the temperature data to another photon.

IFTTT's Android SMS Service with PHPoC Blue
Easy
  • 286
  • 7

This project shows how to use IFTTT Maker channel.

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback