Temperature dependent action

You seem to be describing a thermostat. So far it's not obvious that you need any electronics to solve this problem, let alone a computer.