ACEBOTT IOT Smart Home Starter Kit assembly step by step

ACEBOTT IOT Smart Home Starter Kit assembly step by step

Hello and welcome back. In this article, we are going to introduce an IOT Smart Home Starter Kit by ACEBOTT STEM Education Company. It is an interesting adventure story-based assembly kit. So, it was a great experience for me. In this article, I will share my personal experience with you. This kit is mainly based on the ESP32 DEV board. So we can use this kit to learn IOT. Also, this kit includes various types of sensors and modules. They are the Raindrop Sensor, DHT11 Sensor, Voice Recognition Module, Laser Module, PIR Motion Sensor, RFID Module, Photoresistor Sensor, Button Module, and LED Module. You can read this IOT home story using the link below. It is a very interesting story.

ACEBOTT IOT Smart Home Starter Kit assembly step by step

We can use this kit mainly in three ways. That is,

1. Auto mode

In this mode, we can see the temperature and humidity values on the LED screen. Also, the home window closes automatically when rain is detected, the night light turns on when darkness is detected, the PIR security lighting system, and the RFID card door locker system. You can also turn on or off the laser and colored light using the button module.

2. Voice control mode

In this mode, we can see the Temperature and Humidity values on the LED screen, Also, you can control light, color light, laser, window, and door using voice commands. For that, you have to say “Hi Lumi”. Then, Lumi will assist you. Now, you can use the voice commands. These are described below.

  • open the door
  • close the door
  • open the window
  • close the window
  • open the light
  •  close the light
  •  open the laser
  •  close the laser
  • open the color light
  • close the color light

3. App control mode

In this mode, you can see the sensor environment values and control everything using the ACEBOTT app. (In this case, auto mode is not available)You can download it using the Play Store and App Store links below.

Features of this kit

  • Simple installation
  • App control
  • Improve hands-on ability
  • Learn IOT knowledge
  • Expandable to sensors
  • Various sensors are included

This kit can be used by anyone above 8 years old (with a parent guide) and this can improve the following skills. Also, the assembly time depends on your skill.

  1. Learn how to effectively use the ESP32 board, including uploading code, understanding its features, and coding with the ARDUINO IDE.
  2. Gain a solid foundation in the basics of the C language, as the ESP32 utilizes a simplified C/C++ programming language for controlling circuits and sensors.
  3. Explore various electronic components such as LEDs, sensors, and motors, and understand how they work together in real-world smart home projects.
  4. Enhance your maker skills by building your own smart home using the ACEBOTT kit, following step-by-step tutorials.
  5. Implement essential functions like auto-response, App control, and voice control in your smart home project.
  6. Develop a comprehensive understanding of smart home technology, preparing you for more advanced.

If you want to know more info about this Home IOT kit, please use the links below.

OK, let’s assemble this kit step by step. You can buy this kit using the links below.

Step 1

Firstly, unbox this kit and identify the components in the box.

OK, let’s start assembling this kit. For that, you can use the ACEBOTT assembly guide or the instructions below.

Step 2

Secondly, install the ESP32 board on the “A” wood board. For that, use the six M3*8mm screws and three M3*14mm copper pillars.

Step 3

Thirdly, install the battery holder on the “A” wood board. For that, use the two M3 nuts and two M3*8mm screws.

Step 4

Then, assemble the Fence. For that, use the B1, B2, B3, B4, and six latch pieces.

Step 5

Now, let’s assemble the mirror light. For that, connect the four Circle ring basswood using the two M2*22mm screws. Then, paste the RGB LED strip inside of this ring.

Step 6

Next, connect the single-side mirror to the “D1” basswood board. For that, use the M2*22mm screws. Then, install the circle ring to it. For that, use the half mirror and two M2 nuts.

Step 7

Now, connect the short rack acrylic plate to the “D2” Basswood board. For that, use the four M3*10mm screws and M3 lock nuts. Then, connect the Cross servo motor steering wheel to the Gear acrylic plate. For that use the M1.4*5mm screws.

Step 8

Next, install the servo motor on the “D2” board. For that, used the M2*22 screws and nuts. Then, connect the Acrylic gear plate to the servo motor. In this case, you have to calibrate the servo. I have used a servo tester for that.

Step 9

Now, install the LCD screen on the “D4” Basswood board. For that, use the four M3*10mm screws and eight M3*10mm nuts. Then, connect the F-F 4P Dupont wire to the display(Blue wire — SDA / White wire — SCL).

Step 10

Next, install the “D1”, “D2”, “D3”, and D4 boards on the “C” basswood board.

Step 11

Now, connect the laser module to the Flight Backpack Color Printed board. For that, use the M3*10mm screws and nuts. Then, connect the F-F 3P Dupont wire to it(Blue wire –> S pin). After that, connect the Lumi Color Printed Basswood board to the Flight Backpack. Finally, install the Concave Basswood board, Plate, and Cylinder.

Step 12

Next, connect the LED module to the Fence With Street Lights Basswood board. For that, use the two M3*10mm screws and nuts.

Step 13

After that, install the voice recognition module on the tree-shep basswood board. For that use the M3*10mm screws and nuts. Then, connect the tree-holding basswood piece to the tree.

Step 14

Now, connect the Long Rack Acrylic plate to the “F” basswood board. For that, use the four M3*10mm screws and nuts. Then, connect the Cross servo motor steering wheel to the Gear acrylic plate. For that use the M1.4*5mm screws.

Step 15

Next, install the servo motor on the “F” board. For that, used the M2*22 screws and nuts. Then, connect the Acrylic gear plate to the servo motor. In this case, you have to calibrate the servo. I have used a servo tester for that.

Step 16

Now, install the RFID module on the Lumi Rectangle basswood board. For that, use the M3*10mm screws and nuts. Then, connect the Cross-shaped basswood boards to it.

Step 17

After that, install the Grass Color board, Long Fence Basswood board, Lumi flight backpack, Short fence board, Tree, Door, Street lamp, and Access control on the “C” basswood board. For that, use the M3*10mm screws and nuts.

Step 18

Next, install the button module and PIR sensor module on the “E1” Basswood board. Then, install the photoresistor sensor, raindrop sensor, and DHT11 sensor on the “E2” Basswood board. For that, use the M3*10mm screws and nuts. After that, connect wires to all sensors and modules (blue wire –> S).

Step 19

Now, install the “E1” and “E2” parts on the home. Use four latches for that. Then, connect the wires to all components.

Step 20

Next, connect the all components to the ESP32 board. For that, use the circuit diagram below. Then, put the batteries into the battery holder and connect the house to part to the bottom part. For that, use the two latches.

ACEBOTT IOT Smart Home Starter Kit assembly step by step

Step 21

OK, now connect the ESP32 board to the computer. Then, upload the program to the Lumi house.

ACEBOTT IOT Smart Home Starter Kit assembly step by step
  • First, install the library files.
  • Library files — Download
  • For that, click the document folder and go to the Arduino library folder. Then, copy and paste the library files into it.
  • Then, copy and paste the following program to the Arduino IDE.
  • Arduino complete program — Download
#include <Arduino.h>
#include <Wire.h>
#include <WiFi.h>
#include <ESPmDNS.h>
#include <WiFiClient.h>
#include <Adafruit_Sensor.h>

String item = "0";
const char* ssid = "SriTu Hobby";//change to your own WIFI name
const char* password = "12345678";// change the WIFI password to your own

WiFiServer server(80);
volatile int wifi_mark = 0, wifi_time = 0;
volatile int RGB_RED = 0, RGB_GREEN = 0, RGB_BLUE = 0;
bool wifimode_flag = 1;
//WIFI configuration

#include <HardwareSerial.h>//calling libraries for hard serial ports
volatile int radio;//variables for storing serial voice signals
volatile int radio_mark = 0, radio_time = 0;
//configuration of the voice module

#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel rgb_display_16 = Adafruit_NeoPixel(10, 16, NEO_GRB + NEO_KHZ800);
volatile int buttun;
bool LED_flag = 0;
//configuration of variables for buttons and RGB

#include <hd44780.h>
#include <hd44780ioClass/hd44780_I2Cexp.h>
const int i2cAddress = 0x27; //  I2C address of LCD1602
const int numRows = 2;      // number of LCD1602 rows
const int numCols = 16;     // number of columns of LCD1602
hd44780_I2Cexp lcd(i2cAddress, numRows, numCols); // create the LCD1602 object
#include <DHT.h>
DHT dht25(25, 11);
//configuration of LCD screen and temperature/humidity module

#include <ESP32_Servo.h>
Servo servo_17;
const int window_close = 60;
const int window_open = 135;
bool window_flag = 0;
//window servo configuration

#include <MFRC522_I2C.h>
MFRC522_I2C mfrc522(0x28, -1);
String rfid_str = "";
Servo servo_18;
const int door_close = 5;
const int door_open = 105;
//RFID module configuration and door configuration

void setup()
{
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  delay(1000);

  Serial2.begin(115200, SERIAL_8N1, 13, 27); //configure rx to be 13 pins, tx to be 27 pins, and the serial port name of the voice module is Serial2
  radio = 0;//store the data from the voice serial port into the radio variable
  //initialization of the serial port of the voice module

  pinMode(14, INPUT);
  pinMode(32, INPUT);
  pinMode(5, OUTPUT);
  //initialization of human infrared, photosensitive sensors, and LED pins

  pinMode(26, INPUT);
  pinMode(23, OUTPUT);
  rgb_display_16.begin();
  buttun = 0;
  //initialization of pushbuttons, laser lights, and abyssal lights (light strips)

  Wire.begin();
  lcd.begin(numCols, numRows); // initialize LCD1602
  lcd.backlight();              // turn on the backlight
  delay(500);
  lcd.clear();
  pinMode(25, INPUT);
  dht25.begin();
  // initialization of LCD screen and temperature/humidity module

  mfrc522.PCD_Init();
  servo_18.attach(18, 500, 2500);
  servo_18.write(door_close);
  delay(500);
  //initialization of gate servo and  RFID initialization

  pinMode(33, INPUT);
  servo_17.attach(17, 500, 2500);
  servo_17.write(window_open);
  delay(500);
  //initialization of raindrop sensor and window servos

  delay(2000);

  if (WiFi.status() == WL_CONNECTED)
  {
    Serial.println("");
    Serial.print("Connected to ");
    Serial.println(ssid);
    Serial.print("IP address: ");
    Serial.println(WiFi.localIP());
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print(WiFi.localIP());
    server.begin();
    Serial.println("TCP server started");
    MDNS.addService("http", "tcp", 80);
  }
  if (WiFi.status() != WL_CONNECTED)
  {
    Serial.println("");
    Serial.print("Wifi failed!");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("Wifi failed!");
  }
  //WIFI initialization
}

void loop()
{
  wifi_controll();
  radio_controll();
  if ((wifi_mark == 0) && (radio_mark == 0))
  {
    LED_dark();
    two_light();
    LCD_TEMP_HUMI();
    raindrop_windows();
    RFID_door();
  }
  //no data from wifi detected here.
  delay(50);
}

/****** human night light program 001******/
void LED_dark()
{
  if ((digitalRead(14) == 1) || (analogRead(32) > 3000)) {
    digitalWrite(5, HIGH);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("LED_on");
    delay(1000);
    LED_flag = 1;
  } else if ( LED_flag == 1) {
    LED_flag = 0;
    digitalWrite(5, LOW);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("LED_off");
  }
}
/****** human night light program 001******/

/****** button abyssal light and laser program 002 ******/
void two_light()
{
  if (digitalRead(26) == 0)
  {
    while (digitalRead(26) == 0)
    {
      delay(200);
    }
    buttun++;
    if ((long) (buttun) % (long) (2) == 1)
    {
      digitalWrite(23, HIGH);
      rgb_display_16.setBrightness(100);//configure Brightness
      rgb_all(10, 0, 0, 200); //configure the color
      rgb_display_16.show();//letting the configuration take effect
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("RGB_on");
    }
    else if ((long) (buttun) % (long) (2) == 0)
    {
      digitalWrite(23, LOW);
      rgb_display_16.setBrightness(0);
      rgb_display_16.show();
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("RGB_off");
    }
  }
}
void rgb_all(int j, int rgb_r, int rgb_g, int rgb_b)
{
  for (int i = 1; i <= j; i++)
  {
    rgb_display_16.setPixelColor((i) - 1, (((rgb_r & 0xffffff) << 16) | ((rgb_g & 0xffffff) << 8) | rgb_b));
  }
}
//simplifying the control program for abyssal lamps using program subfunctions
/****** button abyssal light and laser program 002 ******/

/****** raindrop window opening program 003******/
void raindrop_windows()
{
  if (analogRead(33) > 2000)
  {
    servo_17.write(window_close);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("window_close");
    delay(500);
    window_flag = 1;
  } else if (window_flag == 1)
  {
    window_flag = 0;
    servo_17.write(window_open);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("window_open");
  }
}
/****** raindrop window opening program 003******/

/******LCD temperature and humidity display 004******/
void LCD_TEMP_HUMI()
{
  lcd.setCursor(1 - 1, 1 - 1);
  lcd.print("T:");
  lcd.setCursor(3 - 1, 1 - 1);
  lcd.print(dht25.readTemperature());
  lcd.setCursor(9 - 1, 1 - 1);
  lcd.print("H:");
  lcd.setCursor(11 - 1, 1 - 1);
  lcd.print(dht25.readHumidity());
}
/******LCD temperature and humidity display 004******/

/******RFID door opener program 005******/
void RFID_door()
{
  if ( ! mfrc522.PICC_IsNewCardPresent() || ! mfrc522.PICC_ReadCardSerial() )
  {
    delay(50);
    return;
  }
  rfid_str = "";
  for (byte i = 0; i < mfrc522.uid.size; i++)
  {
    rfid_str = rfid_str + String(mfrc522.uid.uidByte[i], HEX);
  }
  Serial.println(rfid_str);
  servo_18.write(door_open);
  lcd.setCursor(1 - 1, 2 - 1);
  lcd.print("               ");
  lcd.setCursor(1 - 1, 2 - 1);
  lcd.print("door_open");
  digitalWrite(19, HIGH);
  delay(2000);
  servo_18.write(door_close);
  lcd.setCursor(1 - 1, 2 - 1);
  lcd.print("               ");
  lcd.setCursor(1 - 1, 2 - 1);
  lcd.print("door_close");
  digitalWrite(19, LOW);
}
/******RFID door opener program 005******/

/*****wifi control program 006*****/
void wifi_controll()
{
  if ((wifi_time != 0) && ((millis() - wifi_time) > 2000))
  {
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("auto_mode");
    Serial.println("auto_mode");
    wifi_mark = 0;
    wifi_time = 0;
  }
  WiFiClient client = server.available();
  if (!client)
  {
    return;
  }
  while (client.connected() && !client.available())
  {
    delay(1);
  }
  String req = client.readStringUntil('\r');
  int addr_start = req.indexOf(' ');
  int addr_end = req.indexOf(' ', addr_start + 1);
  if (addr_start == -1 || addr_end == -1)
  {
    Serial.print("Invalid request: ");
    Serial.println(req);
    return;
  }
  req = req.substring(addr_start + 1, addr_end);
  item = req;
  wifi_mark = 1;
  wifi_time = millis();
  if ( wifimode_flag == 1 )
  {
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("wifi_mode");
    wifimode_flag = 0;
  }
  Serial.println(item);
  String s;
  if (req == "/")  //browser accesses address can read the information sent by 'the client.println(s);'
  {
    IPAddress ip = WiFi.localIP();
    String ipStr = String(ip[0]) + '.' + String(ip[1]) + '.' + String(ip[2]) + '.' + String(ip[3]);
    s = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<!DOCTYPE HTML>\r\n<html>Hello from ESP32 at ";
    s += ipStr;
    s += "</html>\r\n\r\n";
    Serial.println("Sending 200");
    client.println(s);  //send the string S, you can read the information when visiting the address of E smart home using a browser
  }
  if (req == "/Test")
  {
    s = "HTTP/1.1 200 0K\r\nContent-Type: text \r\n\r\n ";
    s += "Test_OK";
    s += "r\n\r\n";
    client.println(s);
  }
  if (req == "/LED_on") //browser accesses the ip address/led/on
  {
    digitalWrite(5, HIGH);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("LED_on");
    client.println("turn on the LED");
  }
  if (req == "/LED_off")
  {
    digitalWrite(5, LOW);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("LED_off");
    client.println("turn off the LED");
  }
  if (req == "/laser_on")
  {
    digitalWrite(23, HIGH);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("laser_on");
    client.println("turn on the jiguang");
  }
  if (req == "/laser_off")
  {
    digitalWrite(23, LOW);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("laser_off");
    client.println("turn off the jiguang");
  }
  if (req == "/RGB_on")
  {
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("RGB_on");
    client.println("turn on the shenyuan");
  }
  if (req == "/RGB_off")
  {
    rgb_display_16.setBrightness(0);
    rgb_display_16.show();
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("RGB_off");
    client.println("turn off the shenyuan");
  }
  if (hasNumber(req) == 1)
  {
    Serial.println("hasNumber(req)==1");
    char result[10];
    extractCharacters(req, result);
    Serial.println(result);
    if (strcmp(result, "RGB_B") == 0)
    {
      RGB_BLUE = extractNumbers(req);
      Serial.println("result==RGB_B");
    }
    else if (strcmp(result, "RGB_G") == 0)
    {
      RGB_GREEN = extractNumbers(req);
      Serial.println("result==RGB_G");
    }
    else if (strcmp(result, "RGB_R") == 0)
    {
      RGB_RED = extractNumbers(req);
      Serial.println("result==RGB_R");
    }
    rgb_display_16.setBrightness(100);
    rgb_all(10, RGB_RED, RGB_GREEN, RGB_BLUE);
    rgb_display_16.show();
    Serial.println(RGB_GREEN);
    Serial.println(RGB_BLUE);
    Serial.println(RGB_RED);
  }
  if (req == "/door_on")
  {
    servo_18.write(door_open);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("door_open");
    client.println("turn on the door");
  }
  if (req == "/door_off")
  {
    servo_18.write(door_close);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("door_close");
    client.println("turn off the door");
  }
  if (req == "/window_on")
  {
    servo_17.write(window_open);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("window_open");
    client.println("turn on the window");
  }
  if (req == "/window_off")
  {
    servo_17.write(window_close);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("window_close");
    client.println("turn off the window");
  }
  if (req == "/bee_on")
  {
    digitalWrite(19, HIGH);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("bee_on");
    client.println("turn on the bee");
  }
  if (req == "/bee_off")
  {
    digitalWrite(19, LOW);
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("bee_off");
    client.println("turn off the bee");
  }
  if (req == "/raindrop_req")
  {
    s = "HTTP/1.1 200 0K\r\nContent-Type: text \r\n\r\n ";
    s += "raindrop_" + String(analogRead(33));
    s += "\r\n\r\n";
    client.println(s);
  }
  if (req == "/brightness_req")
  {
    s = "HTTP/1.1 200 0K\r\nContent-Type: text \r\n\r\n ";
    s += String("brightness_") + String(analogRead(32));
    s += "\r\n\r\n";
    client.println(s);
  }
  if (req == "/PIR_req")
  {
    s = "HTTP/1.1 200 0K\r\nContent-Type: text \r\n\r\n ";
    s += "PIR_" + String(digitalRead(14));
    s += "\r\n\r\n";
    client.println(s);
  }
  if (req == "/temperature_req")
  {
    s = "HTTP/1.1 200 0K\r\nContent-Type: text \r\n\r\n ";
    s += "temperature_" + String(dht25.readTemperature());
    s += "\r\n\r\n";
    client.println(s);
  }
  if (req == "/humidity_req")
  {
    s = "HTTP/1.1 200 0K\r\nContent-Type: text \r\n\r\n ";
    s += "humidity_" + String(dht25.readHumidity());
    s += "\r\n\r\n";
    client.println(s);
  }
  client.stop();
}

int hasNumber(String str)
{
  int i = 0;
  while (str[i] != '\0')
  {
    if (str[i] >= '0' && str[i] <= '9')
    {
      return 1;  // contains numbers
    }
    i++;
  }
  return 0;// does not contain numbers
}

int extractNumbers(String str)
{
  //  iterate over each character in the string
  int i = 0, numbers = 0;
  while (str[i] != '\0')
  {
    //if the character is a number, it is converted to an integer and added to numbers
    if (str[i] >= '0' && str[i] <= '9')
    {
      numbers = (numbers * 10) + (str[i] - '0');
    }
    i++;
  }
  return numbers;
}

void extractCharacters(String str, char *result)
{
  int startIndex = 0;
  int endIndex = 0;
  // find character start position
  while (str[startIndex] != '/' && str[startIndex] != '\0')
  {
    startIndex++;
  }
  // find end-of-character position
  endIndex = startIndex + 1;
  while (str[endIndex] != '/' && str[endIndex] != '\0')
  {
    endIndex++;
  }
  // copy the character part to the result string
  int i;
  for (i = startIndex + 1; i < endIndex; i++)
  {
    result[i - startIndex - 1] = str[i];
  }
  result[i - startIndex - 1] = '\0';
}
/*****wifi control program 006*****/

/***** voice control program 007*****/
void radio_controll()
{
  if ((radio_time != 0) && ((millis() - radio_time) > 2000))
  {
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("auto_mode");
    Serial.println("auto_mode");
    radio_mark = 0;
    radio_time = 0;
  }
  if (Serial2.available() > 0) //whether the voice serial port is receiving data
  {
    radio = Serial2.read();//storing data from the voice serial port into the radio variable
    Serial.println(radio, HEX); //use the serial port on the computer side to send the value in hexadecimal form to the computer's serial monitor
    radio_mark = 1;
    radio_time = millis();
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("               ");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("radio_mode");
    Serial.println("radio_mode");
    if (radio == 0x02)
    {
      servo_18.write(door_open);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("door_open");
    }
    if (radio == 0x03)
    {
      servo_18.write(door_close);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("door_close");
    }
    if (radio == 0x04)
    {
      servo_17.write(window_open);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("window_open");
    }
    if (radio == 0x05)
    {
      servo_17.write(window_close);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("window_close");
    }
    if (radio == 0x06)
    {
      digitalWrite(19, HIGH);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("bee_on");
    }
    if (radio == 0x07)
    {
      digitalWrite(19, LOW);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("bee_off");
    }
    if (radio == 0x08)
    {
      digitalWrite(5, HIGH);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("LED_on");
    }
    if (radio == 0x09)
    {
      digitalWrite(5, LOW);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("LED_off");
    }
    if (radio == 0x0A)
    {
      digitalWrite(23, HIGH);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("laser_on");
    }
    if (radio == 0x0B)
    {
      digitalWrite(23, LOW);
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("laser_off");
    }
    if (radio == 0x0C)
    {
      rgb_display_16.setBrightness(100);//configuration brightness
      rgb_all(10, 0, 0, 200); //configuration color
      rgb_display_16.show();//letting the configuration take effect
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("RGB_on");
    }
    if (radio == 0x0D)
    {
      rgb_display_16.setBrightness(0);//configuration brightness
      rgb_display_16.show();//letting the configuration take effect
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("               ");
      lcd.setCursor(1 - 1, 2 - 1);
      lcd.print("RGB_off");
    }
  }
}
/***** voice control program 007*****/
  • Next, enter your WIFI SSID and password.
  • Now, select the board and port. After, click the upload button.
  • If not work servo motors correctly, please change the servo motor values and reupload this code.

Step 22

Next, remove the USB cable and connect the battery power to the ESP32 board. Then, you can test this IOT home using Auto mode, Voice mode, or App mode. I have described them above.

If you want to control this Home using the App, please follow the instructions below.

  • First, download and install the ACEBOTT app from the Play Store or App Store.
  • Android — Download
  • IOS — Download
  • Next, open this app and click the Save the Lost City button. After that, enter your IP address(See the LCD screen) and click the connect button.
  • Now, you can view sensor data and control everything using this app.

OK, enjoy this IOT Smart Home. The full video guide is below. So, we hope to see you in the next project.

Troubleshooting

  • Check the wire connections.
  • Include all library files.
  • Check the servo motor position.
  • Enter the correct WIFI SSID and password.
  • Select the correct COM port. If not displaying the COM port, please install the CH340 drivers. (Visit our basic ESP32 tutorials)

ACEBOTT IOT Smart Home Starter Kit assembly step by step

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *