Pavan Kumar
Published © GPL3+

Control Home Appliances With An App

Home Automation: control various home appliances with the help of voice recognition.

IntermediateShowcase (no instructions)197
Control Home Appliances With An App

Things used in this project

Hardware components

Atmel AT89S52
×1
Bluetooth Low Energy (BLE) Module (Generic)
×1

Hand tools and fabrication machines

Digilent Screwdriver
Digilent Screwdriver

Story

Read more

Schematics

img_43001_IlUP2r2JTc.JPG

Img 43001 ilup2r2jtc

Code

C.CODE.txt

C/C++
C51 COMPILER V9.50a   AUTOMATE                                                             09/15/2017 10:38:01 PAGE 1   


C51 COMPILER V9.50a, COMPILATION OF MODULE AUTOMATE
OBJECT MODULE PLACED IN .\automate.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\automate.c BROWSE DEBUG OBJECTEXTEND TABS(2) OBJECT(.\automate.obj)

line level    source

   1          #include<reg52.h>
   2          #include<stdio.h>
   3          sbit b= P0^0;
   4          sbit c = P0^1;
   5          
   6          unsigned  int x;
   7          void receive()
   8          {
   9   1      TMOD = 0x20; //timer 1 auto
  10   1      TH1=0xFD;
  11   1      SCON=0x50;
  12   1      TR1=1;
  13   1      while(RI==0);
  14   1      x=SBUF;
  15   1      RI=0;
  16   1      }
  17          void main()
  18          {
  19   1      P0=0x00;
  20   1      while(1)
  21   1      {
  22   2      receive();
  23   2      if(x=='a')
  24   2      b=1;
  25   2      if(x=='b')
  26   2      b=0;
  27   2      if(x=='c')
  28   2      c=1;
  29   2      if(x=='d')
  30   2      c=0;
  31   2      }
  32   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     72    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      2    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.

Credits

Pavan Kumar

Pavan Kumar

0 projects • 0 followers

Comments

Add projectSign up / Login