I modified the code to this:
int readingP,readingS;
lcd.setCursor(0,0);
readingP=analogRead(5);
fine=((30*readingP)/1024); //calculating the desired temp.
lcd.print("Temp finale:"); //printing it on lcd and serial monitor
lcd.setCursor(14,0);
lcd.print(fine);
Serial.print("Temp finale:");
Serial.println(fine);
lcd.setCursor(0, 2);
lcd.print("Temp:");
Serial.print("Temp attuale:");
readingS=analogRead(0);
temp=(5.0 * readingS * 100.0) / 1024; //calculating the actual temp.
lcd.setCursor(11,2);
lcd.print(temp);
Serial.println(temp);
,but it still gives that problem.
I even tried printing the single readings without processing them,and yeah the sensor one is affected by the pot.
Could it be due to a little short I made for mistake the other day? It lasted 1-2 seconds though,and everything else works fine anyway,so I actually don't think it's that..but I just can't figure out what's not working.