Implementation/main.c
void TIM4_IRQHandler()
{

	// distance check
	Distance1(&cap_pin1);
	UT1 = (uint32_t)distance2;                     

	sum += UT1;
	itr++;

	if (itr == 40) {			// averaging 40 data	
		UT1_avg = sum / 40;
		sum = 0;
		itr = 0;
	}

}
// Timer 4 ultrasensor in the front side

Timer 4 ultrasensor in the front side
Timer 4 ultrasensor in the front side
void TIM4_IRQHandler()
{
	Distance1(&cap_pin1);
	UT1 = (uint32_t)distance2;                     
	sum += UT1;
	itr++;
	if (itr == 40) {			
		UT1_avg = sum / 40;
		sum = 0;
		itr = 0;
	}
}
void TIM4_IRQHandler ( ) { Distance1 ( & cap_pin1 ) ; UT1 = ( uint32_t ) distance2 ; sum += UT1 ; itr ++ ; if ( itr == 40 ) { UT1_avg = sum / 40 ; sum = 0 ; itr = 0 ; } }
Timer 4 ultrasensor in the front side
Timer 4 ultrasensor in the front side
// distance check
 // averaging 40 data	
