I have a ESP32 servo and previously it was able to move my 23kg servo just fine. It was being powered via a wall socket to a 6 volts cable. But out of nowhere it suddently stopped rotating the servo.
I have tried to switch pins from GPIO 13, 15, and 10 and use a weaker servo that can operate at 3.3v but still it hasn't been moved. I am wrondering if this is the ESP32 that has potentially been broken via the voltages or not
For wiring info the ESP32 and 23kg servo was being powered via VIN and GND at 6V. Troubleshooting the ESP32 bluetooth works fine and so does uploading new code. (except now I need to hold the boot button to upload which hasn't occured before.)
Blockquote
`#include <SoftwareSerial.h>
#include <ESP32Servo.h>
#include <BluetoothSerial.h>
BluetoothSerial SerialBT;
Servo myservo;
String password = "1";
const int lockPosition = 180;
const int unlockPosition = 90;
void setup() {
myservo.attach(13);
myservo.write(lockPosition);
Serial.begin(115200);
SerialBT.begin("Lock"); // Name of the device
Serial.println("The device is ready to pair");
}
void loop() {
if (SerialBT.available()) {
String incomingData = SerialBT.readStringUntil('\n');
incomingData.trim();
// remove any leading or trailing white spaces
if (incomingData.equals(password)) {
myservo.write(unlockPosition);
SerialBT.println("🎁 Correct password");
SerialBT.println("🎁[1] Update Password ");
SerialBT.println("🎁[2] Lock Chesty ");
String UserChoice = "";
while (UserChoice == "") {
if (SerialBT.available()) {
UserChoice = SerialBT.readStringUntil('\n');
UserChoice.trim();
if (UserChoice.equals("2")) {
Serial.println("entered choice 1");
myservo.write(lockPosition);
SerialBT.println("🎁Locked & Logging Out");
SerialBT.println("🎁 Please Enter Your Password To Login:");
}
if (UserChoice.equals("1")) {
SerialBT.println("🎁 Enter new password: ");
String User_typed_password = "";
while (User_typed_password == "") {
if (SerialBT.available()) {
User_typed_password = SerialBT.readStringUntil('\n');
User_typed_password.trim();
password = User_typed_password;
password.trim();
SerialBT.println("🎁 Password changed successfully!");
SerialBT.println("🎁 Locking...");
myservo.write(lockPosition);
SerialBT.println("🎁 Locked & Logging Out");
SerialBT.println("🎁 Please Enter Your Password To Login:");
}
}
}
}
}
}
}
}`