Temperature sur LCD

Voila, mon premier montage, l'affichage de la temperature sur un LCD et sur le moniteur serie...

Un debut pour ma prochaine station météo...

Des bouts de codes recuperes dans les exemples, sur le net...

Modification apportées en fonction du capteur de temp que j'ai et qui differe de celui de l'exemple, un LCD pas cher et donc peu lisible...

Commentaires bienvenus.

Code :

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

//MCP9701E-TO Pin Variables
int sensorPin = 0; //the analog pin the MCP9701E's Vout (sense) pin is connected to
//the resolution is 19.5 mV / degree centigrade with a
//400 mV offset to allow for negative temperatures
/*
* setup() - this function runs once when you turn your Arduino on
* We initialize the serial connection with the computer
*/
void setup()
{
  
    // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Temperature");
  
Serial.begin(9600); //Start the serial connection with the computer
//to view the result open the serial monitor
}
void loop() // run over and over again
{
//getting the voltage reading from the temperature sensor
int reading = analogRead(sensorPin);
// converting that reading to voltage, for 3.3v arduino use 3.3
float voltage = reading * 5.0;
voltage /= 1024.0;
// print out the voltage
Serial.print(voltage); Serial.println(" volts");
// now print out the temperature
float temperatureC = (voltage - 0.4) * 51; //converting from 19.5 mv per degree with 400 mV offset
//to degrees ((volatge - 400mV) times 100)
Serial.print(temperatureC,1); Serial.println(" degres C");

// set the cursor to column 0, line 1
  // (note: line 1 is the second row
  lcd.setCursor(0, 1);
  // print the Temperature:
  lcd.print(temperatureC,1);

delay(5000); //waiting 5 seconds