Reginald BoaheneJames Carroll
Published

MEGR 3171: Remote Doorbell Notification

Get cell phone notifications when the front doorbell is pressed

BeginnerFull instructions provided4 hours205
MEGR 3171: Remote Doorbell Notification

Things used in this project

Hardware components

Argon
Particle Argon
×3
Resistor 220 ohm
Resistor 220 ohm
×3
Resistor 1k ohm
Resistor 1k ohm
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1
Seeed Studio Grove Buzzer
×1
Breadboard (generic)
Breadboard (generic)
×3
High Brightness LED, White
High Brightness LED, White
×2
5 mm LED: Green
5 mm LED: Green
×1
Jumper wires (generic)
Jumper wires (generic)
×11

Software apps and online services

Maker service
IFTTT Maker service
Particle Build Web IDE
Particle Build Web IDE

Story

Read more

Schematics

Wiring Schematic

Wiring schematic

IFTTT

IFTTT Setup

IFTTT

IFTTT Status

Phone Notification

Cell Phone notification picture

Events log

Code

Argon_1

C/C++
Code for Argon_1
int led = D4;// Assign pin D4 as led
int button = D5;// Assign pin D5 as push button 
int digitalValue; // Initializing didgital signals
void setup() { // Setting up inputs and outputs

  pinMode(button, INPUT);// setting push button as a digital input
  pinMode(led, OUTPUT);// setting led as a digital output
}      
 void loop() { //Loop that runs coninously
 digitalValue = digitalRead(button); //Telling the program to continously read the status of the button
  if (digitalValue == 1) {// If the state of the push button is true (pressed)
    Particle.publish("button-pressed","on", PRIVATE); // Send the state of the buttom to all Argons on the account
    // The following actions will notify the visitor that the home owner has been notified by blinking the led.
    digitalWrite(led, HIGH);// Turn led on
    delay(1000);   // on signal lasts for 1 seconds
    digitalWrite(led, LOW); // turn led off
    delay(500); // off signal lasts for .5 seconds
    digitalWrite(led, HIGH);// Turn led on
    delay(1000);// on signal lasts for 1 seconds
    digitalWrite(led, LOW); // turn led off
    delay(500);// off signal lasts for .5 seconds
    digitalWrite(led, HIGH);// Turn led on
    delay(1000);// on signal lasts for 1 seconds
    digitalWrite(led, LOW); // turn led off
    delay(500);// off signal lasts for .5 seconds
    
  }  else{
    digitalWrite(led, LOW); // If led is not on, turn it off
}
}

Argon_2

C/C++
Code for Argon_2
int buzzer = D4; //Assign pin D4 as buzzer
int digitalValue; //Initializing digital signals
void setup() {//Setting up inputs and outputs

  pinMode(buzzer, OUTPUT);//Setting buzzer as an output
  Particle.subscribe("button-pressed", buttonpressed, MY_DEVICES);// Read the state of the buttom on Argon_1 in my devices.
}      

 void loop() {//Loop that runs continously
}
      
 void buttonpressed(const char *event, const char *data) {   //If the state on Argon_1 is true perform the following actions
    digitalWrite(buzzer, HIGH);// Turn buzzer on
    delay(100);   //on signal duration
    digitalWrite(buzzer, LOW);//Turn buzzer off
    delay(100);//off signal duration
    digitalWrite(buzzer, HIGH);// Turn buzzer on
    delay(100);//on signal duration
    digitalWrite(buzzer,LOW); //Turn buzzer off
    delay(100);//off signal duration
    digitalWrite(buzzer, HIGH);// Turn buzzer on
    delay(100);//on signal duration
    digitalWrite(buzzer, LOW);//Turn buzzer off
    delay(100);//off signal duration
    digitalWrite(buzzer, HIGH);// Turn buzzer on
    delay(100);//on signal duration
    digitalWrite(buzzer, LOW);//Turn buzzer off
    delay(100);//off signal duration
    digitalWrite(buzzer, HIGH);// Turn buzzer on
    delay(100);//on signal duration
    digitalWrite(buzzer, LOW);//Turn buzzer off
    delay(100);//off signal duration
}

Argon_3

C/C++
Code for Argon_3
int LED = D4;// Assign pin D4 as led
int digitalValue;// Initializing digital signals
void setup() { //Setting up inputs and out outputs

  pinMode(LED, OUTPUT);// setting led as a digital output
  Particle.subscribe("button-pressed", buttonpressed, MY_DEVICES);// Read the state of the buttom on Argon_1 in my devices.
}      

 void loop() {//Loop that runs continously
}
      
 void buttonpressed(const char *event, const char *data) {   //If the state on Argon_1 is true perform the following actions
    digitalWrite(LED, HIGH); //Turn led on
    delay(100);   //on signal duration
    digitalWrite(LED, LOW);// Turn led off
    delay(100);// off signal duration
    digitalWrite(LED, HIGH);//Turn led on
    delay(100);//on signal duration
    digitalWrite(LED, LOW);// Turn led off
    delay(100);// off signal duration
    digitalWrite(LED, HIGH);//Turn led on
    delay(100);//on signal duration
    digitalWrite(LED, LOW);// Turn led off
    delay(100);// off signal duration
    digitalWrite(LED, HIGH);//Turn led on
    delay(100);//on signal duration
    digitalWrite(LED, LOW);// Turn led off
    delay(100);// off signal duration
    digitalWrite(LED, HIGH);//Turn led on
    delay(100);//on signal duration
    digitalWrite(LED, LOW);// Turn led off
    delay(100);// off signal duration
    
}

Credits

Reginald Boahene

Reginald Boahene

1 project • 0 followers
James Carroll

James Carroll

1 project • 1 follower

Comments

Add projectSign up / Login