Things used in this project

Hardware components:
A000066 iso both
Arduino UNO & Genuino UNO
×1
Ard nano
Arduino Nano R3
×1
A000053 iso both1
Arduino Micro & Genuino Micro
×1
Echo
Amazon Alexa Amazon Echo
×1
Esp01
Everything ESP ESP8266 ESP-01
×1
RS 232- TTL Converter
×1
Photon new
Particle Photon
×1
Amazon echo dot
Amazon Alexa Echo Dot
×1
Software apps and online services:
Dp image kit 02
Amazon Alexa Alexa Skills Kit
Avs med 3 22
Amazon Alexa Alexa Voice Service

Schematics

Connecting Arduino to esp8266
Uno esp connection ho79gxjivx yqsivepodd

Code

Example Code for Serial Connections of ArduinoC/C++
void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(4800);
  mySerial.println("Hello, world?");
}

void loop() { // run over and over
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}
Connecting to WifiC/C++
#include "debug.h"              // Serial debugger printing
#include "WifiConnection.h"     // Wifi connection // this file is part of my tutorial code
#include <IRremoteESP8266.h>    // IR library 


WifiConnection* wifi;           // wifi connection
IRsend* irSend;                 // infrared sender


//SET YOUR WIFI CREDS 
const char* myWifiSsid = "***";
const char* myWifiPassword = "*******";

//SET TO MATCH YOUR HARDWARE 
#define SERIAL_BAUD_RATE    9600

//PIN 0 is D3 ON THE CHIP 
#define IR_PIN              0



/*---------------------------------------*/
//Runs once, when device is powered on or code has just been flashed 
void setup()
{
    //if set wrong, your serial debugger will not be readable 
    Serial.begin(SERIAL_BAUD_RATE);

    //initialize wifi connection 
    wifi = new WifiConnection(myWifiSsid, myWifiPassword);
    wifi->begin();

    //connect to wifi 
    if (wifi->connect())
    {
        debugPrint("Wifi Connected");
    }
}


/*---------------------------------------*/
//Runs constantly 
void loop()
{
}
Code for testingC/C++
#include "debug.h"              // Serial debugger printing
#include "WifiConnection.h"     // Wifi connection 
#include "Wemulator.h"          // Our Wemo emulator 
#include <IRremoteESP8266.h>    // IR library 


WifiConnection* wifi;           // wifi connection
Wemulator* wemulator;           // wemo emulator
IRsend* irSend;                 // infrared sender


//SET YOUR WIFI CREDS 
const char* myWifiSsid = "***";
const char* myWifiPassword = "*******";

//SET TO MATCH YOUR HARDWARE 
#define SERIAL_BAUD_RATE    9600

//PIN 0 is D3 ON THE CHIP 
#define IR_PIN              0
    
    
/*---------------------------------------*/
//Runs once, when device is powered on or code has just been flashed 
void setup()
{
    //if set wrong, your serial debugger will not be readable 
    Serial.begin(SERIAL_BAUD_RATE);

    //initialize wifi connection 
    wifi = new WifiConnection(myWifiSsid, myWifiPassword);
    wifi->begin();

    //initialize the IR 
    irSend = new IRsend(IR_PIN, false);
    irSend->begin();

    //initialize wemo emulator 
    wemulator = new Wemulator();

    //connect to wifi 
    if (wifi->connect())
    {
        wemulator->begin(); 

        //start the wemo emulator (it runs as a series of webservers) 
        wemulator->addDevice("tv", new WemoCallbackHandler(&commandReceived));
        wemulator->addDevice("television", new WemoCallbackHandler(&commandReceived));
        wemulator->addDevice("my tv", new WemoCallbackHandler(&commandReceived));
        wemulator->addDevice("my television", new WemoCallbackHandler(&commandReceived));
    }
}


/*---------------------------------------*/
//Runs constantly 
void loop()
{
    //let the wemulator listen for voice commands 
    if (wifi->isConnected)
    {
        wemulator->listen();
    }
}

Credits

12540590 741555235974555 3535889509737692135 n u3tbvajh6h
Patel Darshil
2 projects • 38 followers
I am an Electronics Hobbyist pursuing my BE in Electronics and communication
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

Add projectSign up / Login