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.

Contact

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

Control Adafruit NeoPixels using Python and JQWidgets
Easy
  • 938
  • 8

Full instructions

In this tutorial, we'll see how to control an Adafruit NeoPixel ring via mobile using Python and JQWidgets.

What's My I2C Address?
Easy
  • 250
  • 4

The story of how to make a clock through using a LCD 1602 or LCD 2004 over I2C.

I Keep My Cucumber Growing Conditions Moist - Part 3
Easy
  • 281
  • 3

Full instructions

This is the next step with an Particle Photon and softAP integration: cucumbers go online.

MyHumidity Controlled by BME280 and Photon
Easy
  • 530
  • 6

Full instructions

Checks if humidity threshold is reached and informs the user by using Blynk/IFTTT-services with softAP integration.

Study Buddy
Easy
  • 2,853
  • 141

Full instructions

Know when an assignment is coming up!

Study Buddy

Team Alexa and Shannon

MyLCD20x4 clock with value-added information
Easy
  • 43
  • 0

Full instructions

Use a Particle Photon, a BME280 sensor and a cheap LCD20x4 to start your own clock-project.

Add projectSign up / Login