Wednesday, June 3, 2026

Smart Lock System


 

In today’s world, traditional locks are not enough to ensure complete security. That’s why Smart Lock Systems are becoming popular. A smart lock is an electronic locking system that allows you to lock and unlock doors using advanced technology instead of a normal key.


⚙️ What is a Smart Lock?

A Smart Lock is an electronic device that controls door access using:

  • Password / PIN
  • RFID card
  • Fingerprint sensor
  • Mobile app (Bluetooth / Wi-Fi)
  • Remote control system

It replaces traditional keys with digital access methods.


πŸ”§ How It Works?

A smart lock works using a simple electronic control system:

  1. User gives input (button, fingerprint, RFID, mobile app)
  2. Microcontroller processes the signal (like Arduino or ESP32)
  3. Signal sent to actuator (servo motor / solenoid / magnetic lock)
  4. Lock opens or closes automatically

🧠 Main Components Used

  • Microcontroller (Arduino / ESP32)
  • RFID module or fingerprint sensor
  • Servo motor or solenoid lock
  • Relay module (for high power control)
  • Power supply (5V / 12V DC)
  • Push button (optional manual control)
  • Wi-Fi/Bluetooth module (for mobile control)

πŸ”’ Types of Smart Locks

1. RFID Smart Lock

Unlock using a card or tag.

2. Fingerprint Lock

Unlock using biometric fingerprint scanning.

3. Password Lock

Unlock using keypad PIN code.

4. Mobile App Lock

Control lock through Bluetooth or internet.


πŸ’‘ Advantages

✔ No need for physical keys
✔ High security level
✔ Easy access control
✔ Can be integrated with mobile phones
✔ Can store multiple users


⚠️ Limitations

❌ Needs electricity or battery
❌ Can fail during power cut (unless backup is used)
❌ Slightly expensive than normal locks
❌ Requires basic technical setup


🏠 Applications

  • Home doors
  • Office security systems
  • Hotel room access
  • School/college labs
  • Locker systems
  • Smart cabinets

πŸš€ Future of Smart Locks

Smart locks are becoming part of smart homes and IoT systems, where you can:

  • Unlock doors from anywhere in the world
  • Get alerts on your mobile when someone enters
  • Use AI-based face recognition for security

πŸ”š Conclusion

Smart locks are a major step toward modern security systems. They are safer, smarter, and more convenient than traditional locks. With simple electronics like Arduino and sensors, anyone can build a basic smart lock system.

Thursday, May 28, 2026

πŸš€ Why Flutter & Dart Are the Future of App Development



Want to build Android, iPhone, Web, and Desktop apps using a single codebase?

That’s exactly what Flutter and Dart make possible.

πŸ“± What is Flutter?
Flutter is a powerful UI framework developed by Google that helps developers create beautiful and fast applications for:
✔ Android
✔ iOS
✔ Web
✔ Windows
✔ macOS
✔ Linux

⚡ What is Dart?
Dart is the programming language used by Flutter. It is simple to learn, fast, and designed for modern app development.

πŸ’‘ Why Developers Love Flutter
✅ One code for multiple platforms
✅ Fast performance
✅ Attractive UI design
✅ Hot Reload for instant changes
✅ Huge community support
✅ Perfect for startups and business apps

πŸ›  How Apps Are Developed Using Flutter & Dart

1️⃣ Install Flutter SDK and VS Code or Android Studio
2️⃣ Create a new Flutter project
3️⃣ Write app screens using Dart
4️⃣ Design UI with Flutter widgets
5️⃣ Connect APIs and databases
6️⃣ Test app on emulator or real phone
7️⃣ Build APK and publish on Play Store

πŸ“š Apps You Can Build
πŸ” Food Ordering Apps
πŸ›’ E-commerce Apps
πŸ’¬ Chat Applications
πŸ“ GPS & Map Apps
🎡 Music Apps
πŸ₯ Hospital Management Apps
πŸ“– Educational Apps

πŸ”₯ Flutter is becoming one of the most demanded technologies in modern app development because it saves both development time and cost.

Start learning today and build your own mobile app ideas into reality with Flutter & Dart.

Friday, May 22, 2026

πŸ”Œ Learn Breadboard Courses – Turn Ideas Into Real Electronic Projects!

 


Step into the exciting world of electronics and innovation with our Breadboard Learning Courses. Learn how real circuits work, connect components like a pro, and build amazing hands-on projects from scratch — all in a simple and practical way.

Whether you are a beginner, student, or future engineer, this course helps you understand electronics through live practice and creative experiments.

✨ What Makes This Course Special?

✅ 100% Practical Learning
✅ Beginner Friendly Training
✅ Real Electronic Projects
✅ Arduino & Sensor Experiments
✅ Circuit Building on Breadboard
✅ Expert Guidance & Support
✅ Creative Innovation Activities
✅ Certificate After Completion

πŸš€ Learn Amazing Skills

  • Breadboard Basics & Circuit Connections
  • LED, Resistor & Sensor Projects
  • Arduino Programming Fundamentals
  • Electronic Components Understanding
  • DIY Electronics & Automation Projects
  • Robotics & Innovation Concepts

🎯 Who Can Join?

πŸ‘¨‍πŸŽ“ School & College Students
πŸ‘©‍πŸ’» Beginners in Electronics
πŸ€– Robotics Enthusiasts
πŸ’‘ Creative Young Innovators
⚡ Anyone Interested in Technology

🌟 Build • Learn • Innovate

Don’t just study electronics — create it with your own hands!
Join our Breadboard Learning Courses and start building exciting projects that boost creativity, technical skills, and confidence.

πŸ”₯ Learn Today. Create Tomorrow. Innovate Forever.


Call or Whatsapp - +91-7080234447
Visit for more course - codewithwds.in

Monday, May 18, 2026

Send Multiple Email with Their Multiple Detail


 

index.php file

 <form  action="emailsendtoall.php" method="post" enctype="multipart/form-data">

                   

                   

                     

                      
<?php
include 'db.php';
$sql = mysql_query("select * from tablename");                       // here we are show all email form table , on which we want to send emails
while($result = mysql_fetch_array($sql))
{
?>
<?php echo $result['email']; ?>&nbsp;&nbsp;,&nbsp;&nbsp;
<?php
}
?>


                   

                      <input type = "submit"  class = "btn btn-primary btn-sm" value = "Send"  >

                 

                  </form>

send-email.php file

<?php
require 'db.php';   // database connection file
$sql = mysql_query("select * from  tablename");    // select All Email From Table Name
while($result = mysql_fetch_array($sql))
{

$email = $result['email'];

if($email)
{

$get =mysql_query("select * from member where email = '$email'");
$getr = mysql_fetch_array($get);
$emailuser = $getr['email'];                               // user email
$password = $getr['password'];                      // user password   or  // you can fetch multiple detail which you want to send  
$subject = 'Multiple Email With Their Multiple Details';

$message = "<html><head></head>

<body>
<p>Welcome Message Your Email is  ".$emailuser."<br>


And password is ".$password."<br>


(This is an auto-generated email. Please do not reply. Any further queries will be addressed at aoqr2019@gmail.com)


</body></html>";

 

mail($emailuser, $subject, $message);
?>
<script>
alert("Registration Details Send to All Member");
window.location='index.php';
</script>
<?php

}
else
{
?>
<script>
alert("None Email Remain to send");
window.location='index.php';
</script>
<?php

}

}
?>

Tuesday, May 12, 2026

How to create your own AI agent using Javascript


 

You can create your own AI Agent in JavaScript (Node.js) using:

  • OpenAI API
  • Memory
  • Tools/functions
  • Chat interface
Create AI Agent

<script>
require("dotenv").config();

const express = require("express");
const cors = require("cors");
const OpenAI = require("openai");

const app = express();

app.use(cors());
app.use(express.json());

const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});

// Simple Tool
function calculator(a, b) {
  return a + b;
}

app.post("/chat", async (req, res) => {

  const userMessage = req.body.message;

  try {

    // Tool Logic
    if(userMessage.includes("add")) {

      const result = calculator(10, 20);

      return res.json({
        reply: "Answer is " + result
      });
    }

    // AI Response
    const response = await client.chat.completions.create({
      model: "gpt-4.1-mini",
      messages: [
        {
          role: "system",
          content: "You are a helpful AI agent."
        },
        {
          role: "user",
          content: userMessage
        }
      ]
    });

    res.json({
      reply: response.choices[0].message.content
    });

  } catch (error) {

    console.log(error);

    res.json({
      reply: "Error occurred"
    });

  }

});

app.listen(3000, () => {
  console.log("Server running on port 3000");
});

</script>

Please comment if want video on that.


Wednesday, April 22, 2026

How to Add AI to Your Website



index.php file

<form method="POST" action="chat.php">
    <input type="text" name="message" placeholder="Ask anything..." required>
    <button type="submit">Send</button>
</form>

chat.php file

<?php
$apiKey = "YOUR_API_KEY_HERE";

$userMessage = $_POST['message'];

$data = [
    "model" => "gpt-4o-mini",
    "messages" => [
        ["role" => "user", "content" => $userMessage]
    ]
];

$ch = curl_init("https://api.openai.com/v1/chat/completions");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "Authorization: Bearer " . $apiKey
]);

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);

echo $result['choices'][0]['message']['content'];
?>

Monday, April 20, 2026

Image Compressor (JavaScript)


 

<input type="file" id="upload" accept="image/*">

<br><br>

<img id="preview" style="max-width:300px;"><br><br>

<a id="download" download="compressed.jpg">Download Compressed Image</a>



<script>

document.getElementById("upload").addEventListener("change", function(e) {

    const file = e.target.files[0];



    if (!file) return;



    const reader = new FileReader();



    reader.onload = function(event) {

        const img = new Image();



        img.onload = function() {

            const canvas = document.createElement("canvas");

            const ctx = canvas.getContext("2d");



            // πŸ”Ή Resize (optional)

            const maxWidth = 800;

            const scale = maxWidth / img.width;



            canvas.width = maxWidth;

            canvas.height = img.height * scale;



            ctx.drawImage(img, 0, 0, canvas.width, canvas.height);



            // πŸ”Ή Compress (0.0 - 1.0)

            const quality = 0.6;



            const compressedData = canvas.toDataURL("image/jpeg", quality);



            // Preview

            document.getElementById("preview").src = compressedData;



            // Download link

            document.getElementById("download").href = compressedData;

        };



        img.src = event.target.result;

    };



    reader.readAsDataURL(file);

});

</script>

Friday, April 17, 2026

SQL Prepared Statements ( Very Important Concept )


 

<?php

//database connection
$connect = mysqli_connect("localhost","root","","user");

//prepare statement
$sql = $connect->prepare("insert into datas(name)values(?)");   //?-placeholder

//binding parameters
$sql->bind_param("s",$name);    //s - string, i - integer, d - double


//setting value
$name = "phpecho";  //$_POST['name'];

$sql->execute();   //execute the query

echo "Data inserted successfully.";

?>

Video Link (Sql Prepared Statement)

Tuesday, April 14, 2026

Promises in JavaScript



 Create Promise

let myPromise = new Promise(function(resolve, reject) {

Condition

let success = true;

If Condition

if (success) {

    resolve("Task Completed");

}

Else Condition

else {

    reject("Task Failed");

}

Handle Success

.then(function(result) {

    console.log(result);

})

Handle Error

.catch(function(error) {

    console.log(error);

});


Full Code :

let myPromise = new Promise(function(resolve, reject) {

    let success = true;


    if (success) {

        resolve("Task Completed");

    } else {

        reject("Task Failed");

    }

});


myPromise

.then(function(result) {

    console.log(result);

})

.catch(function(error) {

    console.log(error);

});

⚡ Flow Summary

Promise created

Check condition (success)

If true → resolve() → then()
If false → reject() → catch()


🎯 Real-life Example


  • You ordered food πŸ”
  • If delivered →
  • If delivered → resolve("Food arrived")
  • If not →
  • If not → reject("Delivery failed")

Saturday, April 11, 2026

MYSQL vs MYSQLI vs PDO


 
<?php

//mysql

//$conn = mysql_connect("localhost","root","");
//$db = mysql_select_db("Your_database_name", $conn);

//mysqli

//$conn = mysqli_connect("localhost","root","","Your_database_name");

//PDO
$conn = new PDO("mysql:host=localhost;dbname=Your_database_name","root","");  



if(!$conn){

echo "Not connected";
}
else{

echo "Connected PDO";
}

Smart Lock System

  In today’s world, traditional locks are not enough to ensure complete security. That’s why Smart Lock Systems are becoming popular. A sma...