Things used in this project

Hardware components:
Compare particleelectron
Particle Electron
Adafruit Massive Arcade Button with LED - 100mm Red
09590 01
LED (generic)
change with the original
Mfr 25fbf52 475r sml
Resistor 475 ohm
change with the original
Mfr 25frf52 10k sml
Resistor 10k ohm
pull-down from D1 to GND
11026 02
Jumper wires (generic)
4 pieces
Adafruit industries ada592 image 75px
USB-A to Micro-USB Cable
powering the Particle Photon
Gus 1719
C.H.I.P. Approved 3.7 V LiPo Battery
LiPo-Battery in case of power backup
Software apps and online services:
IFTTT Maker service
for signaling
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)

Custom parts and enclosures

STL-File for 3D Printing
with a hole for Micro USB-connector


Version 1.0
Emergency button sketch steckplatine jkddmvly5e


Version 1.0C/C++
// 10 cm Arcade Button from Adafruit: - Switch is N/O (= normaly open)
// Ingo Lohs, v1.0 v. 05.10.2017
// Projekt, um Senioren die Option zu geben, eine Signalisierung über die Particle Cloud abzusetzen
// Signalisierung erfolgt via IFTTT an Empfänger bei Trigger des Events
// zum Test sind Kroko-Stecker mit 10k resistor an D1 zu GND angeschlossen; der Original LED Widerstand wurde durch 470 ohm ausgetauscht
// im Einsatz ist ein Spark Core (mit defektem D0),

/* Wiring:
    a.) A connection from D1 (with the 10K pull-down from D1 to GND) to one side of the switch.
    b.) A connection from 3V3 to the other side of the switch
    c.) A connection from GND to the LED cathode (- side)
    d.) A connection from 3V3 to the LED anode (+ side), assuming the 470 ohm resistor is inside the assembly (change the original resistor and solder this one!)

// If you only want the LED light up on button press, you can wire it in series with the button (put the LED anode also in D1): no µC needed for that.

const int BUTTON_PIN = D1;
const int internalLED = D7;
const int LED_PIN = D4;
bool wasPressed = false;

void setup() {
    pinMode(BUTTON_PIN, INPUT); // not in use: INPUT_PULLUP
    pinMode(internalLED, OUTPUT);
    pinMode(LED_PIN, OUTPUT);

void loop() {
    bool pressed = digitalRead(BUTTON_PIN);
    if (pressed == HIGH && wasPressed == false)     
        digitalWrite(internalLED, HIGH);
        digitalWrite(internalLED, LOW);
        Particle.publish("Emergency-Button", "Button pressed!", PRIVATE);
        digitalWrite(LED_PIN, HIGH);
        digitalWrite(LED_PIN, LOW);
        digitalWrite(LED_PIN, HIGH);
        digitalWrite(LED_PIN, LOW);
    wasPressed = pressed;
    //Serial.println("not pressed");


Img 6554 3ywwumwxbh
Ingo Lohs
17 projects • 39 followers
I am well over 40 years and come from the middle of Germany. You can contact me also in German. Donation for projects:


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


Add projectSign up / Login