Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
elifhocarobotik
Published

ESP8266 ESP-01 Smart Door / Smart Intercom

ESP8266 Arduino project smart intercom ESP-01, The best Arduino project. We made a smart intercom using Esp8266 with Arduino. By using the..

IntermediateProtip8,116
ESP8266 ESP-01 Smart Door / Smart Intercom

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Breadboard (generic)
Breadboard (generic)
×1
ESP8266 ESP-01
Espressif ESP8266 ESP-01
×1
LDR, 5 Mohm
LDR, 5 Mohm
×1
LED (generic)
LED (generic)
×1
Through Hole Resistor, 1 kohm
Through Hole Resistor, 1 kohm
×3
Male/Female Jumper Wires
Male/Female Jumper Wires
×9
Jumper wires (generic)
Jumper wires (generic)
×1
4xAA battery holder
4xAA battery holder
×2
SG90 Micro-servo motor
SG90 Micro-servo motor
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Test Diagram

App Diagram

Code

Test Code

Arduino
Please change these three things while performing the application
#define REMOTEXY_WIFI_SSID "xxxxxxxxxxx"
#define REMOTEXY_WIFI_PASSWORD "xxxxxxxxxxx"
#define REMOTEXY_CLOUD_TOKEN "xxxxxxxx"
#define REMOTEXY_MODE__ESP8266_HARDSERIAL_CLOUD
#include <RemoteXY.h>
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 115200
#define REMOTEXY_WIFI_SSID "xxxxxxxx"  //wifi-name
#define REMOTEXY_WIFI_PASSWORD "xxxxxxxxxxxxxx"  //wifi-password
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "xxxxxxxxxxxx" //app - token
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
 { 255,2,0,18,0,89,0,11,31,5,
 1,0,17,37,29,29,2,1,31,79,
 78,32,45,32,79,70,70,0,131,1,
 6,7,20,7,1,12,31,65,80,80,
 0,131,0,38,7,20,7,2,1,31,
 84,69,83,84,0,69,0,20,22,25,
 25,1,12,129,0,22,50,20,6,1,
 12,68,117,114,117,109,0,67,5,8,
 61,47,10,1,31,12,16,4,128,16,
 80,31,10,1,1,26 };
struct {
uint8_t button_1; // =1 if button pressed, else =0 
 int8_t slider_1; // =0..100 slider position 
 int16_t sound_1; // =0 no sound, else ID of sound, =1001 for example, look sound list in app 
 char text_1[16];  // string UTF8 end zero 
 uint8_t connect_flag;  // =1 if wire connected, else =0 
} RemoteXY;
#pragma pack(pop)
#define PIN_BUTTON_1 13
void setup() 
{
 RemoteXY_Init ();   
 pinMode (PIN_BUTTON_1, OUTPUT);
}
void loop() 
{ 
 RemoteXY_Handler ();
 digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
}

App Code

Arduino
Please change these three things while performing the application;
#define REMOTEXY_WIFI_SSID "xxxxxx"
#define REMOTEXY_WIFI_PASSWORD "xxxxxxxx"
#define REMOTEXY_CLOUD_TOKEN "xxxxxx"
#include <Servo.h>
#define REMOTEXY_MODE__ESP8266_HARDSERIAL_CLOUD
#include <RemoteXY.h>
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 115200
#define REMOTEXY_WIFI_SSID "xxxxxxxx"
#define REMOTEXY_WIFI_PASSWORD "xxxxxxxxxxxxx"
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "xxxxxxxxxxx"
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,2,0,18,0,89,0,11,31,5,
  1,0,17,37,29,29,2,1,31,79,
  78,32,45,32,79,70,70,0,131,1,
  6,7,20,7,1,12,31,65,80,80,
  0,131,0,38,7,20,7,2,1,31,
  84,69,83,84,0,69,0,20,22,25,
  25,1,12,129,0,22,50,20,6,1,
  12,68,117,114,117,109,0,67,5,8,
  61,47,10,1,31,12,16,4,128,16,
  80,31,10,1,1,26 };
struct {
uint8_t button_1; // =1 if button pressed, else =0
  int8_t slider_1; // =0..100 slider position
int16_t sound_1; // =0 no sound, else ID of sound, =1001 for example, look sound list in app
  char text_1[16];  // string UTF8 end zero
 uint8_t connect_flag;  // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
#define PIN_BUTTON_1 13
Servo myservo;
void setup()
{
  RemoteXY_Init ();
   myservo.attach(3);
  pinMode (PIN_BUTTON_1, OUTPUT);
   RemoteXY.slider_1 = 50;
  // TODO you setup code
}

void loop()
{
 
  RemoteXY_Handler ();
  if (analogRead(A0)>60)
  {
    strcpy (RemoteXY.text_1, "Kapı Caliyor");
    RemoteXY.sound_1 = 1001;
  }
  else
   {
    strcpy (RemoteXY.text_1, "Kimse Yok");
    RemoteXY.sound_1 = 0;
   }
  digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
 
 int ms = RemoteXY.slider_1*20+500;
  myservo.writeMicroseconds(ms);



}

Credits

elifhocarobotik
0 projects • 1 follower

Comments