Tilt Rover Device

Hello everyone,

I’m working on a UGV (Unmanned Ground Vehicle) for land surveying, and I’ve encountered an issue where the UGV suddenly rotates to the left after traveling a certain distance. We’re using LoRa for communication and controlling the rover's movement via an app. we also did try adjusting the motor speed however it's still the same.

Here is the video link to the issue
https://drive.google.com/drive/folders/1JojMxTtHQNx4sKrH7pG20R2Yf8E4DKt2?usp=sharing

Here is the following code
Rover Device Code.pdf (146.7 KB)

Please, post your code in text form, using the < CODE > button, then pasting the code where you see ```paste or type code here```. Your result should look like this:

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.println("Hello, Werld!");
  while(1);
}

Also post a wiring diagram reflecting the code.

This "rotating" issue has been on this forum earlier this year (a search might find it... I could not). Check your wiring. Verify sufficient power to both motors. Verify your code does not block one of the motors, causing only the second motor to drive (and rotate).

This is not the code you use.
The code you deleted is not the code you use.

Inside that code, I saw the use of "String" (upper-case "S") which tends to manage memory poorly. Typical recommendation is to use arrays of c-strings (lower-case "s").

This is not the code you use. Show attempted compiling results.
Which processor are you using?
I think I understand... calling different class.loop() functions. Sorry, this is beyond me.