Things used in this project

Hardware components:
Photon new
Particle Photon
×1
Amazon echo dot
Amazon Alexa Echo Dot
×1
12002 04
Breadboard (generic)
×1
N-Channel MOSFET
×1
Pushbutton 12mm
×1
09590 01
LED (generic)
×1
Mfr 25frf52 1m sml
Resistor 1M ohm
×1
Mfr 25frf52 100r sml
Resistor 100 ohm
×1
Mfr 25frf52 10k sml
Resistor 10k ohm
×1
Mfr 25frf52 1k sml
Resistor 1k ohm
×1
11026 02
Jumper wires (generic)
×1
12035 01
SparkFun microB USB Breakout
×1
USB Type A Female Breakout
×1
Adafruit industries ada592 image 75px
USB-A to Micro-USB Cable
×2
Software apps and online services:
Gawd2jnp51w1h1ccsulo
IFTTT Amazon Alexa service

Schematics

Echo Kill Switch Schematic
Echo kill switch mnmbtqshta

Code

Echo Kill Switch Particle CodeArduino
Copy this into the Particle IDE
// Kill switch for Amazon Echo

int kill_switch = D5;
int button = D6;
int btn_prev_state = HIGH;

void setup() {
    
    // Switch is output, button is input
    pinMode(kill_switch, OUTPUT);
    pinMode(button, INPUT);
    
    // Initialize kill switch as default low
    digitalWrite(kill_switch, LOW);
    
    // Register a cloud function
    Particle.function("killSwitch", killSwitch);
}

void loop() {
    
    // If button is pushed, toggle kill switch
    int btn_state = digitalRead(button);
    if ( (btn_state == LOW) && (btn_prev_state == HIGH) ) {
        digitalWrite(kill_switch, !digitalRead(kill_switch));
    }
    btn_prev_state = btn_state;
}

int killSwitch(String state) {
    
    // Set pin state based on given parameters
    if ( state == "on" ) {
        digitalWrite(kill_switch, HIGH);
    } else if ( state == "off" ) {
        digitalWrite(kill_switch, LOW);
    } else {
        return -1;
    }
    
    return 0;
}

Credits

Engineering superhero
Shawn hymel

Engineering Superhero at SparkFun Electronics.

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.

The Food Thief Catcher
Easy
  • 123
  • 4

Work in progress

Are you tired of all of your pesky roommates stealing your food? Me too, thats why we have the Food Thief Catcher!

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.

Motion Activated Room Light
Easy
  • 129
  • 3

Full instructions

With this project, you'll never have to search for the light switch in the dark again.

Add projectSign up / Login
Respect project