Both the ATmega328 and ATmega4809 based Arduino boards have a built in temperature sensor that can be used to measure the temperature of the part, and roughly the ambient temperature. Note that the ATmega2560 in the Arduino Mega does not have this capability. In an ATmega328 based Arduino, such as the Uno or Nano, the …