Modern AVR micros are equipped with internal temperature sensors that can be used to measure core temperature or simply be a source for fast learning ADC without external components. Its accuracy isn’t great for serious readings but enough for monitoring. Nerd Ralph decided to write small library allowing to read on-chip temperature.
Every AVR have a slight different way of setting up ADC, so he managed library to take care of this process. Several #ifdef lines fixes things up when compiling code. Also he took care of calibartion routine which gave pretty decent readings. If you don’t need great accuracy, you can get away with this internal sensor, but for more serious applications, better use external calibrated sensor which isn’t affected bu chip core temperature and noise. Library can be found on Google repository.