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

Arduino UNO Based Smart Notification System with Bluetooth and Flex Sensors

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

Circuit Documentation

Summary

This circuit is designed around an Arduino UNO microcontroller and includes various components such as resistors, a flex sensor, an I2C LCD screen, and a Bluetooth module. The Arduino UNO reads analog values from flex sensors and controls the output to an LCD screen and communicates via Bluetooth. The circuit is likely used for a monitoring system that provides feedback based on the flex sensor readings, displaying messages on the LCD and sending notifications through the Bluetooth module.

Component List

Arduino UNO

Basic Flex Resistor (x3)

Resistor (10k Ohms)

Resistor (200 Ohms) (x2)

I2C LCD 16x2 Screen

Bluetooth module HM-10

Wiring Details

Arduino UNO

Basic Flex Resistor

Resistor (10k Ohms)

Resistor (200 Ohms) (x2)

I2C LCD 16x2 Screen

Bluetooth module HM-10

Documented Code

#include "SoftwareSerial.h"
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(3, 2); // RX, TX
LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C address, 16 columns, 2 rows

// Define LED pins
#define blue 2
#define green 3
#define red 4

// Variables to store sensor readings
unsigned int f;
unsigned int g;
unsigned int h;

void setup() {
  // Set LED pins as outputs
  pinMode(blue, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(red, OUTPUT);

  // Start serial communication
  Serial.begin(9600);
  mySerial.begin(9600);

  // Initialize the LCD
  lcd.init();
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("  Welcome To");
  lcd.setCursor(0, 1);
  lcd.print("JustDoElectronic");
  lcd.clear();
  delay(3000);
}

void loop() {
  // Read analog values from flex sensors
  f = analogRead(1);
  g = analogRead(2);
  h = analogRead(3);

  // Check sensor values and act accordingly
  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 ");
  } else {
    delay(200);
  }
}

This code is designed to read sensor data from three flex sensors and display messages on an LCD screen as well as send notifications via Bluetooth depending on the sensor readings. It uses the SoftwareSerial library to communicate with the Bluetooth module and the LiquidCrystal_I2C library to control the LCD.