#include "adc.h" void adc_init(void) { DDRC=0x00;//make adc port input ADCSRA |=(1<512) { temp_val=(adc_val*ref_volt)/1023; temp_val=(temp_val-2.51)/0.185; amp=(unsigned int)(temp_val*100); } return amp; } uint8_t read_temp(uint8_t ch,uint16_t sample) This function will measure temparature using LM35 { uint16_t temp_val1; uint8_t temp1; temp_val1=read_adc_avg(ch,sample); temp1=temp_val1/2; return temp1; } */