2 analog controller and a relay

Break the problem down into parts

  1. Print the value returned by the light sensor when it is lit and covered. Now you know that it works
  2. Test the value returned by the light sensor and turn the relay on and off at appropriate levels. Now you know that works
  3. Print the value returned by the temperature sensor at various temperatures. Now you know that it works
  4. Test the value returned by the temperature sensor and turn the relay on and off as it goes past 80 degrees . Now you know that works

You should easily be able to find examples of each of these steps.

  1. Combine steps 2 and 4 above to turn on the relay at the right light level and wait for the temperature to reach 80 degrees and then turn off the relay.