Skip to content

toandevnguyen/ESP32-DS18B20-Led-Temp-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android App for IoT Light Control and Temperature Display

Languages

Project Overview

  • This repository contains the code for an Android application that interacts with an IoT system using an ESP32-C3 microcontroller. The app allows users to control 220V lights remotely and monitor temperature using a DS18B20 sensor via MQTT over TCP.
  • Demo Video Link

Features

  • Remote control of 220V lights via MQTT
  • Real-time temperature display from DS18B20 sensor
  • User-friendly interface

Technologies Used

  • Hardware:

    • ESP32-C3

      ESP32-C3

    • DS18B20 Temperature Sensor

      ESP32-C3
    • 1 Channel 5V Relay Module

      Relay

    • LED Bulb

      LED Bulb
  • Software: Android (Java/Kotlin), ESP-IDF Visual Studio Code Extension, MQTT Explorer

Setup Instructions

  1. Setting Up Mosquitto MQTT Broker on Google Cloud's Compute Engine:

    • Create a virtual machine (VM) on Google Cloud Platform with Ubuntu 20.04 Server.
    • Connect to your VM using SSH.
    • Install Mosquitto MQTT Broker:
      sudo apt update
      sudo apt install -y mosquitto mosquitto-clients
    • Enable Mosquitto to start on system boot and start the Mosquitto service:
      sudo systemctl enable mosquitto
      sudo systemctl start mosquitto
    • Verify that Mosquitto is running:
      sudo systemctl status mosquitto
  2. Wiring Diagram:

    Wiring Diagram

  3. Installing VS Code and ESP-IDF Extension:

    • Download Visual Studio Code
    • Follow the instructions in the following repository to install the ESP-IDF extension: vscode-esp-idf-extension.
    • Clone the following repository to set up ESP32-C3: IoT-ESP32-C3-MQTT-TCP-RemoteLed-DS18B20
      git clone https://github.com/toandevnguyen/IoT-ESP32-C3-MQTT-TCP-RemoteLed-DS18B20.git
    • Open the project in VS Code.
    • Configure MQTT broker settings in the application code.
    • Build and flash the code to the ESP32-C3 module.
  4. Mobile App Setup:

    • Clone the repository: RemoteLights220V-DS18B20
      git clone https://github.com/toandevnguyen/RemoteLights220V-DS18B20.git
    • Open the project in Android Studio.
    • Configure MQTT broker settings in the application code.
    • Build and run the app on an Android device.
    • Here are some screenshots of the app interface:
    Splash Screen Screen 2 Screen 3

Usage

  • Use the app to connect to the IoT system.
  • Control the 220V lights and view real-time temperature data.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages