MakrToolbox
Published

Pause Netflix/Hulu with Alexa

This project makes a remote for pausing Netflix/Hulu using Amazon Echo.

BeginnerFull instructions provided2 hours721
Pause Netflix/Hulu with Alexa

Things used in this project

Story

Read more

Code

FUVED80IUYDCS1S.ino

C#
void setup() {
    Spark.function("parse", parse);
    
    // 0-7 maps to D0-D7
    for (int i = 0; i <= 7; i++) {
        pinMode(i, OUTPUT);
    }
}

void loop() {
}

int parse(String cmd) {
    cmd.trim();
    cmd.toUpperCase();
    
    if (cmd.startsWith("ENABLE")) {
        int pin = cmd.substring(6).toInt();
        digitalWrite(pin, HIGH);
        delay(100);             // wait 100 ms
        digitalWrite(pin, LOW);
   // }
  //  if (cmd.startsWith("DISABLE")) {
  //      int pin = cmd.substring(7).toInt();
   //     digitalWrite(pin, HIGH);
   //     delay(100);             // wait 100 ms
  //      digitalWrite(pin, LOW);
   }
}

Credits

MakrToolbox

MakrToolbox

9 projects • 14 followers

Comments