Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino and ESP32-Based Smart Sensor Hub with LCD Display

View and Edit Project In Cirkit DesignerImage of Arduino and ESP32-Based Smart Sensor Hub with LCD Display

Circuit Documentation

Summary

This circuit integrates an Arduino UNO, an ESP32, and several sensors and modules including an HC-SR04 Ultrasonic Sensor, an MQ-2 Gas Sensor, a GPS NEO 6M module, a DHT11 Temperature and Humidity Sensor, and a 16x2 I2C LCD. The Arduino UNO serves as the primary microcontroller, interfacing with the sensors and the LCD, while the ESP32 handles GPS data.

Component List

Arduino UNO

ESP32 (30 pin)

HC-SR04 Ultrasonic Sensor

MQ-2 Gas Sensor

GPS NEO 6M

DHT11 Temperature and Humidity Sensor

16x2 I2C LCD

Wiring Details

Arduino UNO

ESP32 (30 pin)

HC-SR04 Ultrasonic Sensor

MQ-2 Gas Sensor

GPS NEO 6M

DHT11 Temperature and Humidity Sensor

16x2 I2C LCD

Documented Code

Arduino UNO Code

#include <LiquidCrystal.h>

// Initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // Set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Hello, World!");
}

void loop() {
  // Set the cursor to column 0, line 1
  lcd.setCursor(0, 1);
  // Print the number of seconds since reset:
  lcd.print(millis() / 1000);
}

This code initializes a 16x2 LCD connected to the Arduino UNO and displays "Hello, World!" on the first line. The second line shows the number of seconds since the Arduino was reset.