Library for LM335A Temperature Sensor

Hello! Nice work on this class GreenRobotics - I was trying to do the same thing when I came across your example. I do suggest adding Rankine units for completeness. I also wondered two things:

  1. it is a good idea to use a for-loop to achieve an integrated reading? For example, I pass a value of 250 into ReadTemp() and it finds the average of 250*X readings taken 1/X ms apart. How quickly then can the Arduino sample? A test of this gave better resolution but I couldn't tell how artificial the noise was.

2 ) I don't quite understand why the pinmode is set if the reading is done through an analog pin. Is it necessary to set the modes on both D&A pins?

Thanks!