Esp32 (wifi drone) connectivity issue

Hi i am working on making a wifi drone and is almost complete im testing it but im facing an issue.
The issue being that when i connect the esp with my drone and press then up button it works but the esp32 then glitches & it dissconects. I can not connect it to my mobile again as it does not show up in the search. i have to reupload the code for it to work
im powering my esp32 and motors separately.
Screenshot 2024-06-23 235721



The code for wifi connectivity

void initializeWiFi() 
{
  WiFi.mode(WIFI_AP);
  WiFi.softAP(ssid, password);

  IPAddress myIP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(myIP);
  server.on("/", HTTP_handleRoot);
  server.onNotFound( HTTP_handleRoot );
  server.begin();
}
void setup() 
{
  Serial.begin(921600);
  initializeWiFi();
  read_MPU6050(); //this only sets up the MPU6050 read mpu6050 in updatePID()
  motorState(); //state of motor pins
}

void loop() 
{ 
  updatePID(); // Update PID controllers by reading from mpu6050
  handleMotorControl(); // Handle motor control based on the received command
  updateMotorValues(); // Update motor values based on PID,
  writeMotor(); // Write motor values to pins 
}

You are not going to get more help if you open new post every 10 minutes for same subject.

You need a Singoalla to tell as You provide no useful facts at all.
Please read, and use, How to get the best out of this forum - Using Arduino / Project Guidance - Arduino Forum

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.