To downsize the thermometer further, I replaced the Arduino UNO with an ATtiny85. The Arduino sketch has to be modified in order to match the ATtiny pin layout.
#include <LiquidCrystal595.h>
float tempC = 0;
float tempf = 0;
int tempPin = 3; // AtTiny
float samples[8];
float maxi = 0, mini = 100;
int i;
//Initialize the library with datapin, latchpin, clockpin, num_lines
//LiquidCrystal595 lcd(2,3,4); // Arduino
LiquidCrystal595 lcd( 0, 1, 2); // AtTiny
void setup() {
lcd.begin(16,2);
lcd.setCursor(2,0);
lcd.print("LM335Z");
lcd.setCursor(3,1);
lcd.print("Thermometer");
delay(5000);
lcd.clear();
lcd.setCursor(2,0);
lcd.print("reading ...");
lcd.setCursor(1,1);
lcd.print("...done!");
delay(5000);
lcd.clear();
}
void loop() {
for(i = 0;i<=7;i++) {
samples[i] = (( 5.0 * analogRead(tempPin) * 100.0) / 1024.0) - 273.15;
lcd.setCursor(0,0);
lcd.print("Current temp is: ");
lcd.setCursor(1,1);
lcd.print(" Celsius ");
lcd.setCursor(12,1);
lcd.print(samples[i]);
tempC = tempC + samples[i];
delay(800);
}
tempC = tempC/8.0;
tempf = (tempC * 9)/ 5 + 32;
if(tempC > maxi) {
maxi = tempC; }
if(tempC < mini) {
mini = tempC; }
lcd.setCursor(0, 1);
lcd.print(" Fahrenheit ");
lcd.setCursor(12, 1);
lcd.print(tempf);
delay(5000);
tempC = 0;
}