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
×1
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

Two Person Weasley Clock with Particle Photon and IFTTT
Easy
  • 689
  • 8

Full instructions

Taking inspiration from the Harry Potter character's Weasley clock, this one uses Particle and IFTTT to tell you where two people are.

Security+ 2.0 MyQ Garage Door Opener
Easy
  • 770
  • 3

Full instructions

Interface newer garage door openers with more than a relay.

IoT Alcohol Tester
Easy
  • 1,896
  • 16

Full instructions

This project explains how to build a device for estimating blood alcohol content from a breath sample.

Temperature and humidity monitor
Easy
  • 337
  • 3

Full instructions

This is a project that uses SHT30 to get the current temperature and humidity. And then displays it on a no-chip embeded LCD.

Measuring temperature and humidity with Particle Photon
Easy
  • 528
  • 3

Full instructions

Measure temperature and humidity with Particle Photon and Adafruit Si7021 using the Adafruit Si7021 library for I2C based communication.

Study Buddy
Easy
  • 2,391
  • 140

Full instructions

Know when an assignment is coming up!

Study Buddy

Team Alexa and Shannon

Add projectSign up / Login
Respect project