Indoor Air Quality Measuring System

Hey guys, I'm a telecommunications student and my project is on air monitoring system and i am running into a few issues with the code. Kindly assist me.
Here's the code

int err = SimpleDHTErrSuccess;  
  if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {  
   Serial.print("Read DHT11 failed, err="); Serial.println(err);delay(1000);
   int m = analogRead(A0);
int n = analogRead(A3);
Serial.print(m);
Serial.print(n);
  Serial.print((int)temperature); Serial.print(" .*C, ");   
  Serial.print((int)humidity); Serial.print(" .H");

The output is
if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
^
Compilation error: expected unqualified-id before 'if'

We would need to see the full code. From this snippet, 'SimpleDHTErrSuccess' could be anything.

What does this mean? Are you trying to create a pointer to SimpleDHTErrSuccess?

If I assist, do I get my name on your diploma?

1 Like

Could be a problem in the code that you did not post.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.