Go Down

Topic: I have a problem with my code (Read 23 times) previous topic - next topic

kumarat5

Hello
Please help me by removing the problem with this sketch which tells me:
expected unqualified-ID befor "{" token.
Thank you and best regards.
#include <math.h>

const int B = -741.84;               
const int R0 = 5140;           
const int T2 = A2;

 int a (analogRead(T2));
{
float RK = 1023.0/a-1.0;
RK = R0*RK;
float T2 = 1.0/(log(RK/R0)/B+1/298.15)-273.15; // Pretvorba v *C
return T2
}
void setup()
{
    Serial.begin(9600);

}

void loop()
{
float T2
T2 = a(analogRead(T2))

 
    Serial.print("T2 = " " *C");
    Serial.println(T2);

    delay(5000);
}

Go Up