IT IS SHOWING EXPECTED PRIMARY EXPRESSIONS BEFORE IF

HI.I POSTED YESTERDAY ABOUT THE PROGRAM AND I GET A GOOD RESPONSE.I CHANGED THE PROGRAM AND NOW IT IS SHOWING EXPECTED PRIMARY EXPRESSIONS BEFORE IF.I HAVE ATTACHED THE CODING BELOW.I HOPE I GET A GOOD HELP

sketch_sep23a.ino (1.07 KB)

Can't read from attachment - post in line within code brackets and indent it correctly before by pressing ctrl-t in the IDE

Post also the compiler error, it will tell you where the line number of the error, where you most likely have an extra ; or closing }

No need to yell. (Don't use all upper-case characters.)

Here's the code:-

#include  <LiquidCrystal.h>

LiquidCrystal lcd(8, 9, 10, 11, 12, 13);

const int tempPin = A0;

int value = 0;
float volts = 0.0;
float temp = 0.0;
float tempF = 0.0;

void setup()
{
    Serial.begin(9600);
    lcd.begin(16, 2);
    pinMode(7, OUTPUT);
    pinMode(6, OUTPUT);
    pinMode(5, OUTPUT);

}
void loop()
{
    value = analogRead(A0);
    volts = (value / 1024.0) * 5.0;
    temp = volts * 100.0;
    tempF = temp * 9 / 5 + 32;

    Serial.print("temperature= ");
    Serial.println(temp);
    lcd.setCursor(0, 0);
    lcd.print("TEMP= ");
    lcd.print(temp);
    lcd.print(" C");
    lcd.setCursor(0, 1);
    lcd.print("TEMP= ");
    lcd.print(tempF);
    lcd.print(" F");

    <if else> (tempPin < 36.5);
    {
        digitalWrite(8, HIGH);
        digitalWrite(9, LOW);
        digitalWrite(10, LOW);
        delay(1000);
    }
    <if else> (tempPin > 37.5);
    {
        digitalWrite(8, LOW);
        digitalWrite(9, HIGH);
        digitalWrite(10, LOW);
        delay(1000);
    }
    <if else> (tempPin <= 37.5 - 36.5);
    {
        digitalWrite(8, LOW);
        digitalWrite(9, LOW);
        digitalWrite(10, HIGH);
        delay(1000);
    }
}

This:-<if else> (tempPin < 36.5);should look like this:-if(tempPin < 36.5)Same for all the others. (But as you've already been told, you don't really want to compare 'tempPin'.)


You shouldn't cross-post, either. You were getting perfectly good help yesterday here, so why start a new thread today?
And why did you change to this anyway:-<if else>since you had it right yesterday?

I won't bother re-hashing the other things you were told in the other thread. But in future, post your code, (as suggested), don't just attach it.