Sensor acts weird on 9V supply

Thanks for the replies.

You need to tell us how you wired it up.
Is the 9V going to the power jack?
Is the sensor wired up to the Vin pin or the +5V pin?

The 9V adapter is connected to the power supply.
As for the sensor, if you take the flat side of the LM35 my connections are:

  • Left: +5v Pin
  • Middle: A0 Pin
  • Right: GND Pin

Did you find that sketch somewhere ? Please copy a link to it in your text.

You write a floating point variable to the lcd.
Is that allowed ?
LiquidCrystal - Arduino Reference

I Don't think its the LCD since it works when connected to USB but not when connected trough 9V adapter.

Edit:
Here's a scheme