Arduino “having11” Guy
Published © GPL3+

Particle Photon Doorbell

Get notified when the doorbell is pressed for about 1/6 the price of the RING doorbell!

IntermediateShowcase (no instructions)5 hours1,663
Particle Photon Doorbell

Things used in this project

Hardware components

Photon
Particle Photon
×1
Jumper wires (generic)
Jumper wires (generic)
×1
AAA batteries
×3
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Resistor 221 ohm
Resistor 221 ohm
×1

Software apps and online services

Particle.io IDE
IFFFT

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Doorbell Upper

3D print it

Doorbell Lower

3D print it

Schematics

Schematic

Schematic bb 6jo2genedi

Code

Code

C/C++
int LED = 5;
int button = 1;
bool state = false;

void setup() {
pinMode(LED,OUTPUT);
pinMode(button,INPUT);
//attachInterrupt(D1,rung,FALLING);
digitalWrite(LED,HIGH);
delay(2000);
digitalWrite(LED,LOW);
}

void loop() {
    state = digitalRead(button);
    if(state == false){
       blink();
       state = false;
    }
    else{
    rung();
    state = false;
    }
}

void blink(){
    digitalWrite(LED,HIGH);
    delay(200);
    digitalWrite(LED,LOW);
    delay(200);
}
void rung(){
    Particle.publish("doorbell","HIGH",PUBLIC);
    digitalWrite(LED,HIGH);
    delay(5000);
    digitalWrite(LED,LOW);
}

Credits

Arduino “having11” Guy

Arduino “having11” Guy

25 projects • 171 followers
I love creating cloud solutions that can interact with hardware along with using Arduino boards and Raspberry Pis to create new projects.
Contact

Comments

Add projectSign up / Login