Guidance for temperature control project

Hi guys, i am trying to make a temp control system for sister lizard enclosure.

I have an LM35 as an input, and a relay as a digital output.

My code sort of works but i am unsure if i beleive the readings, as right now its switching between 25.88 and 25.39 constantly.
But if i hold the LM35 the temperature does go up.

When the temperature reaches 30C the relay is initiated, however the LCD display dims and jumps from 30c to 32 C instatntly and then carrys on to go either lower or go higher.

i am powering the arduino nano from the mains via the USB.

This issue is even worse if i try to power it from my laptop.

Is there anything i have overlooked here,?

Would much appreciate any advice than can be given to improve my code.

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

float temp;
int sensorPin = A1;
int relay =13;

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
  pinMode(13, OUTPUT);  

void loop() {
        temp = analogRead(sensorPin);
        temp = temp * 0.48828125;
        lcd.setCursor(0, 0);
	lcd.print("Temperature: ");	
        lcd.print(" C");
        if (temp >24) {
        if (temp <30) 

How are you driving the relay? Can you provide a schematic of your connections? Is there a diode across the relay coil?

using the 5v and grnd from the nano.

i have 5v from the nano going into a breadboard, and then having it split of in 3 ways.
one to the lm35
one to the LCD
one to the relay

and its the same for the GRND

What is the coil current requirement (or the coil resistance)? One of those specs should be listed on the relay. It really sounds like you are pulling the supply voltage down. Can you measure Vcc with the relay energized to see if it falls?

this is the relay module:

Does the relay work OK if you just run it with the Blink program??

NOTE these relays are active LOW. Do you have anything connected to the relay outputs yet?

See Arduino Power on the ArduinoInfo.Info Wiki HERE: