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

Arduino UNO-Based Smart Notification System with Flex Sensors and Bluetooth Connectivity

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based Smart Notification System with Flex Sensors and Bluetooth Connectivity

Circuit Documentation

Summary

This circuit involves an Arduino UNO microcontroller interfaced with a 16x2 I2C LCD, an HC-05 Bluetooth module, and multiple flex sensors. The circuit is designed to read analog values from the flex sensors and display messages on the LCD based on the sensor readings. Additionally, the circuit can communicate via Bluetooth to send messages.

Component List

  1. 16x2 I2C LCD

    • Description: A 16x2 character LCD display with I2C interface.
    • Pins: GND, VCC, SDA, SCL
  2. Resistor

    • Description: A resistor with a resistance of 10 Ohms.
    • Pins: pin1, pin2
  3. HC-05 Bluetooth Module

    • Description: A Bluetooth module for wireless communication.
    • Pins: Key, VCC, TXD, RXD, State, GND
  4. Flex Sensor

    • Description: A sensor that changes resistance when bent.
    • Pins: terminal 1, Terminal 2
  5. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: SDA, AREF, GND, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, A5, A4, A3, A2, A1, A0, Vin, 5V, 3.3V, RESET, IOREF, SCL

Wiring Details

16x2 I2C LCD

Resistor

HC-05 Bluetooth Module

Flex Sensor

Arduino UNO

Documented Code

Arduino UNO Code

#include "SoftwareSerial.h"
#include <LiquidCrystal_I2C.h>

SoftwareSerial mySerial(3, 2);
LiquidCrystal_I2C lcd(0x27, 16, 2);

#define blue 2
#define green 3
#define red 4

unsigned int f;
unsigned int g;
unsigned int h;

void setup() {
  pinMode(blue, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(red, OUTPUT);
  Serial.begin(9600);
  mySerial.begin(9600);
  lcd.init();
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("  Welcome To");
  lcd.setCursor(0, 1);
  lcd.print("JustDoElectronic");
  delay(3000); // Add delay before clearing the LCD
  lcd.clear();
}

void loop() {
  f = analogRead(1);
  g = analogRead(2);
  h = analogRead(3);

  if (f <= 722) {
    digitalWrite(blue, HIGH);
    digitalWrite(green, LOW);
    digitalWrite(red, LOW);
    mySerial.println("Plz Give Me Water");
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("  Plz Give Me");
    lcd.setCursor(0, 1);
    lcd.print("     Water   ");
    delay(3000);
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print(" If Anything");
    lcd.setCursor(0, 1);
    lcd.print("  You Want ");
  } else if (g <= 670) {
    digitalWrite(green, HIGH);
    digitalWrite(blue, LOW);
    digitalWrite(red, LOW);
    mySerial.println("Plz Give Me Food");
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("  Plz Give Me ");
    lcd.setCursor(0, 1);
    lcd.print("     Food   ");
    delay(3000);
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print(" If Anything");
    lcd.setCursor(0, 1);
    lcd.print("  You Want ");
  } else if (h <= 675) {
    digitalWrite(green, HIGH);
    digitalWrite(blue, LOW);
    digitalWrite(red, LOW);
    mySerial.println("Plz Give Me Tea");
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("  Plz Give Me");
    lcd.setCursor(0, 1);
    lcd.print("     Tea   ");
    delay(3000);
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print(" If Anything");
    lcd.setCursor(0, 1);
    lcd.print("  You Want ");
  }
  delay(200);
}

This code initializes the LCD and Bluetooth module, reads analog values from the flex sensors, and displays messages on the LCD based on the sensor readings. It also sends messages via Bluetooth.