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,712
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

7 projects • 181 followers
IoT, Arduino, and Raspberry Pi. I can create design, code, and build projects for only $22/hr. Just message me with your project request.
Contact

Comments

Add projectSign up / Login