Posts

Showing posts from March, 2024

Password Door Lock Using Tinkercad

 #include <Servo.h> #include <LiquidCrystal_I2C.h> #include <Keypad.h>   #ifndef PASSWORD_H #define PASSWORD_H   #define MAX_PASSWORD_LENGTH (20) #define STRING_TERMINATOR '\0' class Password { public: /** * @brief Construct object in memory, set all variables *  * @param pass  */ Password(char* pass); /** * @brief Set the password *  * @param pass  */ void set(char* pass); /** * @brief Evaluate a string, is it equal to the password? *  * @param pass  * @return true  * @return false  */ bool is(char* pass); /** * @brief Append a char to the guessed password *  * @param character  * @return true  * @return false  */ bool append(char character); /** * @brief Reset the guessed password, one can guess again *  */ void reset(); /** * @brief Is the current guessed password equal to the target password? *  * @return true  * @return false  */ bool evaluate();

Circuit Diagram Emergency Light

Image
 

Materials Required Emergency Light

  SMD Led 4v :-  https://amzn.to/3VsJ2O1 Charging Module C type Charger :-  https://amzn.to/4ctoxaj Single Battery Holder with 3.7v Battery :- https://amzn.to/3VrpyJS Switch :-  https://amzn.to/3Vq93xu

All Electronics Components

Arduino UNO:- https://amzn.to/3mhamzG Jumper Wires:- https://amzn.to/3GvV1SW   LCD Display With I2C Module:- https://amzn.to/3Vd1Gtt Servo Motor:- https://amzn.to/3PqtfMt   5V Buzzer :- https://amzn.to/3KkLNK9 Keypad 4*4:- https://amzn.to/3VkzWmp Breadboard:- https://amzn.to/3Ulqv3G   Ultrasonic Sensor:- https://amzn.to/3sGsyFO IR Sensor:- https://amzn.to/3Kjn6P6 Seven Segment Display:- https://amzn.to/3wvFikq Temperature and Humidity Sensor:-  https://amzn.to/3IeZ1rb 5V Relay:- https://amzn.to/447ZpAs Sound Sensor:- https://amzn.to/3YFZASc Red LED:- https://amzn.to/44Oh29D MQ-2 Gas Sensor:- https://amzn.to/3KHEkFt 5V Buzzer and 9V Battery:- https://amzn.to/3KkLNK9 Green-Red LED:- https://amzn.to/3nWWawe 220 Ohm Resistor:- https://amzn.to/3ZPIUXv Hookup Wire:- https://amzn.to/3nWXBuK

Materials Required Keypad Lock

Arduino UNO:- https://amzn.to/3mhamzG Jumper Wires:- https://amzn.to/3GvV1SW   LCD Display With I2C Module:- https://amzn.to/3Vd1Gtt Servo Motor:- https://amzn.to/3PqtfMt   5V Buzzer :- https://amzn.to/3KkLNK9 Keypad 4*4:- https://amzn.to/3VkzWmp

Arduino Code Keypad Lock

#include <Servo.h> #include <LiquidCrystal_I2C.h> #include <Keypad.h> #include <Password.h> #define buzzer 11 Servo servo; LiquidCrystal_I2C lcd(0x27, 16, 2); String newPasswordString; //hold the new password char newPassword[6]; //charater string of newPasswordString byte a = 5; bool value = true; Password password = Password("0123"); //Enter your password byte maxPasswordLength = 6; byte currentPasswordLength = 0; const byte ROWS = 4; // Four rows const byte COLS = 4; // Four columns char keys[ROWS][COLS] = {   {'D', 'C', 'B', 'A'},   {'#', '9', '6', '3'},   {'0', '8', '5', '2'},   {'*', '7', '4', '1'}, }; byte rowPins[ROWS] = {2, 3, 4, 5}; byte colPins[COLS] = {6, 7, 8, 9}; Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); void setup() {      Serial.begin(9600);   pinMode(buzzer, OUTPUT);   servo.att

Circuit Diagram Keypad Lock

Image
 

Materials Required Distance Measurement Sensor

  Arduino UNO:- https://amzn.to/3mhamzG Jumper Wires:- https://amzn.to/3GvV1SW   Breadboard:- https://amzn.to/3Ulqv3G LCD Display With I2C Module:- https://amzn.to/3Vd1Gtt Ultrasonic Sensor:- https://amzn.to/3sGsyFO

Arduino Code Distance Measurement

 #include <Wire.h>  #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 16, 2); #define trigPin A0 //Sensor Trig pin connected to Arduino pin A0 #define echoPin A1 //Sensor Echo pin connected to Arduino pin A1 long distanceInch; void setup() {   pinMode(trigPin, OUTPUT);   pinMode(echoPin, INPUT);   lcd.init();   lcd.backlight();   lcd.clear();   lcd.setCursor(0,0);   lcd.print("Simple  Circuits");   delay(2000);   lcd.clear();   lcd.setCursor(0,0);  //Set LCD cursor to upper left corner, column 0, row 0   lcd.print("Distance:");//Print Message on First Row   lcd.setCursor(0,1);   lcd.print("Distance:"); } void loop() {   long duration, distance;   digitalWrite(trigPin, LOW);   delayMicroseconds(2);   digitalWrite(trigPin, HIGH);   delayMicroseconds(10);   digitalWrite(trigPin, LOW);   duration = pulseIn(echoPin, HIGH);   distance = (duration/2) / 29.1;   distanceInch = duration*0.0133/2;         lcd.setCursor(9,0);      lcd.print("

Circuit Diagram Ultrasonic Distance Measurement

Image
 

Material Required Car Parking System

  Arduino UNO:- https://amzn.to/3mhamzG Jumper Wires:- https://amzn.to/3GvV1SW   Breadboard:- https://amzn.to/3Ulqv3G LCD Display With I2C Module:- https://amzn.to/3Vd1Gtt Servo Motor:- https://amzn.to/3PqtfMt IR Sensor:- https://amzn.to/3Kjn6P6

Arduino Code Car Parking System

 // Created by Simple Circuits  #include <Wire.h>  #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2);    #include <Servo.h>  Servo myservo; int IR1 = 2; int IR2 = 3; int Slot = 4;           //Total number of parking Slots int flag1 = 0; int flag2 = 0; void setup() {   Serial.begin(9600);      lcd.init(); //initialize the lcd     lcd.backlight(); //open the backlight     pinMode(IR1, INPUT); pinMode(IR2, INPUT);    myservo.attach(4); myservo.write(100); lcd.setCursor (0,0); lcd.print("     ARDUINO    "); lcd.setCursor (0,1); lcd.print(" PARKING SYSTEM "); delay (2000); lcd.clear();   } void loop(){  if(digitalRead (IR1) == LOW && flag1==0){ if(Slot>0){flag1=1; if(flag2==0){myservo.write(0); Slot = Slot-1;} }else{ lcd.setCursor (0,0); lcd.print("    SORRY :(    ");   lcd.setCursor (0,1); lcd.print("  Parking Full  ");  delay (3000); lcd.clear();  } } if(digitalRead (IR2) == LOW && flag2==0){flag2=1

Circuit Diagram Car Parking System

Image
 

Materials Required 7 Segment Display

                                                                   Arduino UNO:- https://amzn.to/3mhamzG Jumper Wires:- https://amzn.to/3GvV1SW   Breadboard:- https://amzn.to/3Ulqv3G  Seven Segment Display:- https://amzn.to/3wvFikq  

Arduino Code 7 Segment Display

   //Created by Simple Circuits byte pin[] = {2, 3, 4, 5, 6, 7, 8, 9};//arduino pin array   int number[10][8] = {//number array   {0, 0, 0, 0, 0, 0, 0, 1},//0   {1, 1, 0, 0, 0, 1, 1, 1},//1   {0, 0, 1, 0, 0, 0, 1, 0},//2   {1, 0, 0, 0, 0, 0, 1, 0},//3   {1, 1, 0, 0, 0, 1, 0, 0},//4   {1, 0, 0, 0, 1, 0, 0, 0},//5   {0, 0, 0, 0, 1, 0, 0, 0},//6   {1, 1, 0, 0, 0, 0, 0, 1},//7   {0, 0, 0, 0, 0, 0, 0, 0},//8   {1, 1, 0, 0, 0, 0, 0, 0},//9 };   void setup() {   for (byte a = 0; a < 9; a++) {     pinMode(pin[a], OUTPUT);//define output pins   } }   void loop() {   for (int a = 0; a < 10; a++) {     for (int b = 0; b < 9; b++) {       digitalWrite(pin[b], number[a][b]);//display numbers     }     delay(1000);//delay   } }

Circuit Diagram of 7 Segment Display

Image