Giter VIP home page Giter VIP logo

echo's Introduction

Alexa Controlling 8 Channel Relay With Node MCU v3

Before Using this code, Keep in Mind :

  • Make Sure Arduino is Install On your System, and ESP8266 driver is also install.
  • By going tools you have set Correct Board which is Node MCU 12E 1.0

If You Accidently Fried Your Node MCU or Relay Please Don't Blame Me, Code is Working Properly already

You Need !

  • Node MCU v3
  • 8 Channel Power Relay.
  • Power Adapter to Turn On Node MCU Recommended 5v 1 Amp (Minimum)

And here's some code! where You Have to Make Changes ๐Ÿ‘

//Change wifi before you flash
const char* ssid = "wifi Name";
const char* password = "Wifi Password";

//relay pin setup for funct
int relayOne = 5;
int relayTwo = 4;
int relayThree = 0;
int relayFour = 2;
int relayFive = 14;
int relaySix = 12;
int relaySeven = 13;
int relayEight = 15;


// Format: Alexa invocation name, local port no, on callback, off callback
lightOne = new Switch("Light One", 80, lightOneOn, lightOneOff);
lightTwo = new Switch("Light Two", 81, lightTwoOn, lightTwoOff);
lightThree = new Switch("Light Three", 82, lightThreeOn, lightThreeOff);
lightFour = new Switch("Light Four", 83, lightFourOn, lightFourOff);
outletOne = new Switch("Outlet One", 84,outletOneOn, outletOneOff);
outletTwo = new Switch("Outlet Two", 85, outletTwoOn, outletTwoOff);
outletThree = new Switch("Outlet Three", 86, outletThreeOn, outletThreeOff);
outletFour = new Switch("Outlet Four", 87,outletFourOn, outletFourOff);

//relay pins setup i Used D1,D2,D3,D4,D5,D6,D7,D8 followed as assigned below,
//if you are willing to change Pin or planning to use extra please Check Image in Github File..:)
    pinMode (5, OUTPUT);
    pinMode (4, OUTPUT);
    pinMode (0, OUTPUT);
    pinMode (2, OUTPUT);
    pinMode (14, OUTPUT);
    pinMode (12, OUTPUT);
    pinMode (13, OUTPUT);
    pinMode (15, OUTPUT);
    digitalWrite (5,LOW);
    digitalWrite (4,LOW);
    digitalWrite (0,LOW);
    digitalWrite (2,LOW);
    digitalWrite (14,LOW);
    digitalWrite (12,LOW);
    digitalWrite (13,LOW);
    digitalWrite (15,LOW);

If You Are Looking for Channel Relay Coding for Alexa by Raspberry,Check code on GitHub

echo's People

Contributors

phantom-cluster avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.