This ESP32 Powred Robot That Follows My Hand!
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() { ...