Help with my aquaponics setup

Hi guys,
I’m trying to setup my home aquaponics automation and im very new to this. i followed instructions on how to setup me water temperature sensor with LCD display and that’s working beautifully. http://www.hacktronics.com/Tutorials/arduino-digital-temperature-sensor-tutorial.html

Now i want to add code lines for low temperature to activate a relay and high temperature turn off the relay. my relay is on digital 8

here’s my code so far its the 3rd and 4th attachments i’m trying to add variables to turn on and off a relay on digital pin 8 and i just dont know how to write it.

can anyone give me some help with this.

Eli_s_Aquaponics.ino (2.44 KB)

relay.ino (1.18 KB)

Can you edit please edit your post. Just before your code insert the tag [code] then at the end of it insert the tag [/code] It makes it possible for us to copy and paste to work on the modifications you want.

here’s my code so far.
what i want to do in to control a relay that would control a solenoid. the electrical loads are mild they will not be connected to heaters directly.

Thanks for your help. E.

Eli_s_Aquaponics.ino (2.44 KB)