help with programming pro micro

Hi All,
I am using a Pro micro to control a temperature sensor.
The code is working but the the ENABLE_PIN A3 is not working as I want it do.
I want the ouput ,ENABLE_PIN to go LOW when the temperature is below 30 degrees.
The problem is when the ENABLE_PIN goes HIGH when the temperature is over 30 degrees
but is does not go LOW when the temperature goes below 30 degrees.
So I need help in fixing this function.
The code for Pro micro...
Appreciate all help

/////////////////////////////////////////////////////////

First of, please use the </> button to put your code into code-tags.
You are calling your beep () function only, when the temperature is above 30. So the pin will never go low. Also don't use the String class, but instead refactor this line

Serial.print("Ambient: " + String(therm.ambient(), 2));

to

Serial.print("Ambient: ");
Serial.print(therm.ambient(), 2);

This will save you about 1k of flash.

Hi,
Can you help me to modify this code so that the ENABLE_PIN does to LOW
//regards,Jay

void beep(unsigned char delayms){
digitalWrite(buzzer_PIN, 1000);
delay(delayms); // wait for a delayms ms
digitalWrite(buzzer_PIN, 0);
delay(delayms); // wait for a delayms ms

if(therm.object()>30,ENABLE_PIN) { // if temp is higher than tempMax
digitalWrite(ENABLE_PIN,HIGH); // turn on led
} else
digitalWrite(ENABLE_PIN,LOW); // else turn of led
}

Hi,
Should I modify the code this ?
//Jay

Why are you not using the code tags as I said? If you want help you should provide your code in a way that is readable. Once you have edited your posts I will post my answer.