Implementation/main.c
void park_mode1(uint32_t UT2_avg)
{
	printf("park_mode1");
	printf("UT1_avg = %d, UT2_avg = %d IR1 = %d, IR2 = %d\r\n", UT1_avg, UT2_avg, IR1, IR2);
	if (park_count1 > 3) {
		if (UT2_avg > 30)		// turn back left for finding parking lot
		{
			wheel(&pwm_motorBA, &pwm_motorBB, BACK, 50); // direction of two motor
			wheel(&pwm_motorAA, &pwm_motorAB, BACK, 35); // direction of two motor
			park_count2++;
		}

		else					// goes back to find the parking lot
		{
			wheel(&pwm_motorBA, &pwm_motorBB, BACK, 33); // direction of two motor 1st
			wheel(&pwm_motorAA, &pwm_motorAB, BACK, 45); // direction of two motor
		}

		if (park_count2 > 22)	// move to the park mode 2
		{
			mode = 2;
		}

	}
}
// Park mode 1 to start parking

Park mode 1 to start parking
Park mode 1 to start parking
void park_mode1(uint32_t UT2_avg)
{
	printf("park_mode1");
	printf("UT1_avg = %d, UT2_avg = %d IR1 = %d, IR2 = %d\r\n", UT1_avg, UT2_avg, IR1, IR2);
	if (park_count1 > 3) {
		if (UT2_avg > 30)		
		{
			wheel(&pwm_motorBA, &pwm_motorBB, BACK, 50); 
			wheel(&pwm_motorAA, &pwm_motorAB, BACK, 35); 
			park_count2++;
		}
		else					
		{
			wheel(&pwm_motorBA, &pwm_motorBB, BACK, 33); 
			wheel(&pwm_motorAA, &pwm_motorAB, BACK, 45); 
		}
		if (park_count2 > 22)	
		{
			mode = 2;
		}
	}
}
void park_mode1 ( uint32_t UT2_avg ) { printf ( " " ) ; printf ( " \r \n " , UT1_avg , UT2_avg , IR1 , IR2 ) ; if ( park_count1 > 3 ) { if ( UT2_avg > 30 ) { wheel ( & pwm_motorBA , & pwm_motorBB , BACK , 50 ) ; wheel ( & pwm_motorAA , & pwm_motorAB , BACK , 35 ) ; park_count2 ++ ; } else { wheel ( & pwm_motorBA , & pwm_motorBB , BACK , 33 ) ; wheel ( & pwm_motorAA , & pwm_motorAB , BACK , 45 ) ; } if ( park_count2 > 22 ) { mode = 2 ; } } }
Park mode 1 to start parking
Park mode 1 to start parking
// turn back left for finding parking lot
 // direction of two motor
 // direction of two motor
 // goes back to find the parking lot
 // direction of two motor 1st
 // direction of two motor
 // move to the park mode 2
