became resently a Arduino Uno user. Neat little thing.
Anyway, was reading a book Mastering Microcontrollers - Helped by Arduino by Clemens Valens.
Must read from my perspective.
On page 149 it states that
“the ADC of the AVR is is a complex precision device that Arduino and its limited API do not really do justice”.
There is a on-chip temperature sensor accessible by changing in wiring_analog.c
ADMUX = (analog_reference << 6) (pin & 0x07)
ADMUX = (analog_reference << 6) (pin & 0x0f)
it says that you have now a total of 16 (0 through 15) channels instead of 8 (0 through 7) channels and channel 8 corresponds to the on-chip temperature sensor. Selecting channel 14 allows you to measure the internal reference of 1.1V
Channel 15 is connected to 0V, wich is convenient for calibrating a measurement or to verify the proper operation of the ADC, or, in some cases, of your system. The other channels are reserved and if you select one of them, the result zill be unpredictable.
The sketch for the temperature sensor is a followed:
* On- chip Thermometer
int A8 = 22;
The rest you can read in the book.
this is pretty sweet, to be honest.
my question around it was, why did the Arduino Team leave this option out. What implementations would it have on the whole Arduino usage by changing it. (Sorry, big novice here)