error in interfacing with Arduino UNO board

#include <stdlib.h>
#include <Math.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);


//**********************fuzzy_logic***********************
//*****************************************************

String intToString(int32_t value, byte dig_num) {
	char temp[12];
	for (int8_t i = 0; i < 12; i++) { temp[i] = 0; }
	//**********************
	for (int8_t i = dig_num; i > 0; i--)
	{
		temp[i - 1] = 48 + (value % 10);
		value = value / 10;
	}
	return String(temp);
}

class motor
{
public:
	//***************
	motor(uint8_t pin_f, uint8_t pin_r) {
		pinMode(pin_f, OUTPUT);
		pinMode(pin_r, OUTPUT);
		this->pin_f = pin_f;
		this->pin_r = pin_r;
	}
	//**********farward(int32_t time = 0)**********
	void farward(int32_t time = 0) {
		digitalWrite(pin_r, LOW);
		digitalWrite(pin_f, HIGH);
		//******
		if (time) { delay(time); digitalWrite(pin_f, LOW); }
	}
	//**********reverse(int32_t time = 0)**********
	void reverse(int32_t time = 0) {
		digitalWrite(pin_f, LOW);
		digitalWrite(pin_r, HIGH);
		//******
		if (time) { delay(time); digitalWrite(pin_r, LOW); }
	}
	//**********stop()**********
	void stop() {
		digitalWrite(pin_f, LOW);
		digitalWrite(pin_r, LOW);
	}
private:
	uint8_t pin_f, pin_r;
};



int32_t PV1 = 0, PV2 = 0;
int32_t SV1 = 0, SV2 = 0;
int32_t SV11 = 0, SV12 = 0;
int8_t flag = 0;
motor motor1(8, 9);
motor motor2(10, 11);


// the setup function runs once when you press reset or power the board
void setup() {

	//************************
	lcd.begin(16, 2);
	lcd.print("Init......");
	delay(500);
	lcd.clear();
	SV1 = analogRead(A1);
	SV2 = analogRead(A0);
	//**********
	lcd.setCursor(0, 0); lcd.print("SV1=");
	lcd.print(intToString(SV1, 3));
	//**********
	lcd.setCursor(8, 0); lcd.print("SV2=");
	lcd.print(intToString(SV2, 3));
}

// the loop function runs over and over again until power down or reset
void loop() {
lable:
	delay(200);
	PV1 = analogRead(A1);
	PV2 = analogRead(A0);
	//**********
	lcd.setCursor(0, 1); lcd.print("PV1=");
	lcd.print(intToString(PV1, 3));
	//**********
	lcd.setCursor(8, 1); lcd.print("PV2=");
	lcd.print(intToString(PV2, 3));
	if (PV1 > SV11 || PV1 < SV11) { SV11 = PV1; goto lable; }
	else if (PV2 > SV12 || PV2 < SV12) { SV12 = PV2; goto lable;}
	for (int i = 0; i < 10; i++)
	{
		PV1 = analogRead(A1);
		PV2 = analogRead(A0);
		//**********
		lcd.setCursor(0, 1); lcd.print("PV1=");
		lcd.print(intToString(PV1, 3));
		//**********
		lcd.setCursor(8, 1); lcd.print("PV2=");
		lcd.print(intToString(PV2, 3));
		//*************************
		if (PV1 > SV1 + 2) {
			motor1.farward();
			i = 0;
		}
		else if (PV1 + 2 < SV1) {
			motor1.reverse();
			i = 0;
		}
		else
		{
			motor1.stop();

		}
		//*************************
		if (PV2 > SV2 + 2) {
			motor2.reverse();
			i = 0;
		}
		else if (PV2 + 2 < SV2) {
			motor2.farward();
			i = 0;
		}
		else
		{
			motor2.stop();

		}
		delayMicroseconds(6000);
		motor1.stop();
		motor2.stop();
	}


}

Bad idea to use Strings on an Uno. They cause memory problems and program crashes.

This is an absolutely fascinating line of code:

	if (PV1 > SV11 || PV1 < SV11) { SV11 = PV1; goto lable; }

Did you write it yourself?

Hint: for informed help, read and follow the directions in the "How to use this forum" post.

After some super highly advanced Boolean algebra and assorted other mathematical manipulations, and quite some (certainly not inconsiderable) head scratching, here is the arduously simplified version of that if statement (ignoring the idiotic goto, of course):

PV1=SV11;

PS: I wonder if the compiler is smart enough to figure that out.

Oops, you are right! The higher math was too much for me. Correction:

SV11=PV1;

The goto is likely a major problem, as nothing below that statement is executed.