Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Control Your Home Lighting System with Voice Commands

Components and supplies

Control Your Home Lighting System with Voice Commands
Arduino UNO
×1
Control Your Home Lighting System with Voice Commands
1Sheeld
×1
Control Your Home Lighting System with Voice Commands
LED (generic)
×3

About this project

the project idea was to proof that you can control your home lighting system using only your voice commands , so the 3 LEDs in the project represents different systems in our home as an example .
Control Your Home Lighting System with Voice Commands
All you need for this project : 1-Arduino uno 2-1sheeld 3-3 LEDs (different colours )then connect the circuit as shown below 
Control Your Home Lighting System with Voice Commands
Open 1sheeld app and connect the app with your 1sheeld then open "voice recognition " shield 
Control Your Home Lighting System with Voice Commands
Press "tap to speak : and then say "play "the 3 leds will turn on 
Control Your Home Lighting System with Voice Commands
you can turn them off by saying "stop"
Control Your Home Lighting System with Voice Commands
Only turn the blue one by saying "blue "
Control Your Home Lighting System with Voice Commands
the yellow one by saying "yellow"
Control Your Home Lighting System with Voice Commands
and finally the green one by saying "green "
Control Your Home Lighting System with Voice Commands


Code

  • Untitled file
Untitled fileArduino
#define CUSTOM_SETTINGS
#define INCLUDE_VOICE_RECOGNIZER_SHIELD
#define INCLUDE_MUSIC_PLAYER_SHIELD
#define INCLUDE_TERMINAL_SHIELD
/* Include 1Sheeld library. */
#include <OneSheeld.h>
int Bledpin=13;
int Yledpin=12;
int Gledpin=11;

/* Voice commands set by the user. */
const char playCommand[] = "play";
const char pauseCommand[] = "stop";
const char stopCommand[] = "yellow";
const char nextCommand[] = "green";
const char BlueCommand[] = "blue";

void setup()
{
  pinMode(13,OUTPUT);
  pinMode(12,OUTPUT);
  pinMode(11,OUTPUT);
  /* Start Communication. */
  OneSheeld.begin();
  /* Error Commands handiling. */
  VoiceRecognition.setOnError(error);
  
  VoiceRecognition.start();
}

void loop () 
{
  /* Check if new command received. */
  if(VoiceRecognition.isNewCommandReceived())
  {
    /* Compare the play command. */
    if(!strcmp(playCommand,VoiceRecognition.getLastCommand()))
    {
      digitalWrite(13,HIGH);
      digitalWrite(12,HIGH);
      digitalWrite(11,HIGH);
    }
    /* Compare the pause command. */
    else if (!strcmp(pauseCommand,VoiceRecognition.getLastCommand()))
    {
       digitalWrite(13,LOW);
      digitalWrite(12,LOW);
      digitalWrite(11,LOW);
    }
    /* Compare the stop command. */
    else if (!strcmp(stopCommand,VoiceRecognition.getLastCommand()))
    {
       digitalWrite(13,LOW);
      digitalWrite(12,HIGH);
       digitalWrite(11,LOW);
    }
    /* Compare the next command. */
    else if (!strcmp(nextCommand,VoiceRecognition.getLastCommand()))
    {
      digitalWrite(13,LOW);
      digitalWrite(11,HIGH);
      digitalWrite(12,LOW);
       
    }
    else if (!strcmp(BlueCommand,VoiceRecognition.getLastCommand()))
    {
      
      digitalWrite(12,LOW);
      digitalWrite(13,HIGH);
       digitalWrite(11,LOW);
    }
  }
}

/* Error checking function. */
void error(byte errorData)
{
  /* Switch on error and print it on the terminal. */
  switch(errorData)
  {
    case NETWORK_TIMEOUT_ERROR: Terminal.println("Network timeout");break;
    case NETWORK_ERROR: Terminal.println("Network Error");break;
    case AUDIO_ERROR: Terminal.println("Audio error");break;
    case SERVER_ERROR: Terminal.println("No Server");break;
    case SPEECH_TIMEOUT_ERROR: Terminal.println("Speech timeout");break;
    case NO_MATCH_ERROR: Terminal.println("No match");break;
    case RECOGNIZER_BUSY_ERROR: Terminal.println("Busy");break;
  }
}
the code

Schematics

circuit.fzz

Manufacturing process

  1. Transitioning Industrial Control Systems to Wireless Networks
  2. Voice-Activated Home Appliances: Bluetooth Control with Google Assistant
  3. Control an Arduino LED with Cortana via Bluetooth on Windows 10
  4. ThimbleKrox: Finger-Mounted Mouse Control Using Arduino Micro & MPU-6050
  5. Seamless Smart Phone Control of Home Lighting Systems
  6. Control 65,280 Relays with Arduino: Expandable IO & Relay Solutions
  7. Protecting Industrial Control Systems: Proven Strategies & Best Practices
  8. Control System Migration Success: Expert Strategies for a Seamless Transition
  9. Advanced Process Control Systems for Industrial Efficiency
  10. Eight Proven Steps to Diagnose and Fix Your Process Control System