Posts

Showing posts from July, 2026

This ESP32 Powred Robot That Follows My Hand!

Image
Paste This Code on Your Arduino IDE   #include <ESP32Servo.h> // 3 Servo objects banayein Servo servo1; Servo servo2; Servo servo3; // --- Pins Setup --- const int servoPin1 = 18; const int servoPin2 = 21; const int servoPin3 = 22; const int trigPin = 5;   const int echoPin = 19; // --- Speed Variables --- int forwardSpeed = 1600; int stopMotor = 1500;     void setup() {   // Teeno servo ko attach karein   servo1.attach(servoPin1);   servo2.attach(servoPin2);   servo3.attach(servoPin3);     // Sensor Setup   pinMode(trigPin, OUTPUT);   pinMode(echoPin, INPUT);     Serial.begin(115200);   Serial.println("3 Servos Ready!");     // Shuru mein teeno ko rok kar rakhein   servo1.writeMicroseconds(stopMotor);   servo2.writeMicroseconds(stopMotor);   servo3.writeMicroseconds(stopMotor); } void loop() {  ...

ESP32 Captive Portal Search Engine Code

Image
Paste This Code on Your Arduino IDE   #include <WiFi.h> #include <DNSServer.h> #include <WebServer.h> #include <HTTPClient.h> #include <WiFiClientSecure.h> #include <ArduinoJson.h> // ---------------- USER CONFIGURATION ---------------- // Backend Router (Internet connection for ESP32) const char* sta_ssid = "Airtel_X";       // Aapka router ka naam const char* sta_pass = "Gau@0369";    // Aapka router ka password // ESP32 Access Point (Network name for users) const char* ap_ssid = "ESP32 SEARCH ENGINE";        // AP Name jo mobile mein show hoga // ---------------------------------------------------- const byte DNS_PORT = 53; DNSServer dnsServer; WebServer server(80); // Function to safely encode search queries for URL (e.g. "Elon Musk" -> "Elon%20Musk") String urlEncode(String str) {   String encodedString = "";   char c;   char code0;   char code1;  ...