Reading data via GPIO
As you are dealing with temperature sensor here, so you need to use Analog to digital converter (ADC). You will have to put values into the ADC registers and then read the incoming values from ADC channel. 

You have not mentioned which Micro controller you are focusing, so I am assuming Atmega32. You will have to read its datasheet to understand the ADC registers and you will have to make a function to read the values coming from the ADC channel and those values will be your temperature values.

For example:

 //function to read adc value
 uint16_t adc_read(uint8_t ch)
{
    ch &amp;= 0b00000111;  
    ADMUX = (ADMUX &amp; 0xF8)|ch;    
    ADCSRA |= (1&lt;&lt;ADSC);
    while(ADCSRA &amp; (1&lt;&lt;ADSC));
    return (ADC);
}


so in your main, all you need to do is read values using above function and store it in a variable.

int main()
{
  uint16_t adc_result0;
  while(1)
  {
    adc_result0 = adc_read(0); //reading values and storing it in variable for further processing.
  }
}


Note: Above functions are just for the demo purpose and may not give the actual output.