Need help with my school project ASAP! expected primary-expression before ')' token

#include <Wire.h>
#include <Keypad_I2C.h>
#include <Keypad.h>
#include <LiquidCrystal.h>
#include <SFE_BMP180.h>
#define  I2CADDR 0x20
SFE_BMP180 bmp180;

//Seteo de Pines
const int Rs = 24, En = 25, D4 = 26, D5 = 27, D6 = 28, D7 = 29; 
LiquidCrystal lcd(Rs, En, D4, D5, D6, D7); 

// Variables a utilizar
float R = 0;       // Para almacenar Resistencia.
float T = 0;       // Para almacenar Temperatura     
float P = 0;       // Para almacenar Presion
   
//Codigo comun para el Teclado:
const byte ROWS = 4;
const byte COLS = 4;
char keys[ROWS][COLS] = {
  {'1','2','3','U'},
  {'4','5','6','L'},
  {'7','8','9','R'},
  {'S','0','E','D'}
};

// Filas y Columnas del teclado
byte rowPins[ROWS] = {0, 1, 2, 3};
byte colPins[COLS] = {4, 5, 6, 7};

Keypad_I2C kpd(makeKeymap(keys), rowPins, colPins, ROWS, COLS, I2CADDR, PCF8574);
// Establecida la dirección LCD en 0x27 para una pantalla de 20 caracteres y 4 líneas


//MENU, invocado con funcion
void MENU(){
  Serial.println();
  Serial.print("Seleccione Operacion");
  Serial.println();
  Serial.print("1: Sistema SI");
  Serial.println();
  Serial.print("2: Sistema USA");
  Serial.println();
  Serial.print("3: Sensor T - R");
  Serial.println();
  
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Seleccione Operacion");
  lcd.setCursor(0, 1);
  lcd.print("1: Sistema SI");
  lcd.setCursor(0, 2);
  lcd.print("2: Sistema USA");
  lcd.setCursor(0, 3);
  lcd.print("3: Sensor T - R");
}

void setup() {
  Wire.begin( );
  kpd.begin( makeKeymap(keys) );
  Serial.begin(9600);
  lcd.begin(20, 4);

  // Impresion de la presentacion inicial en el serial 
  Serial.print("I N T E C");       
  Serial.println();                
  Serial.print("Instrumentación y Medidas");
  Serial.println();                
  Serial.print("Richard Rodríguez");
  Serial.println();
  Serial.print("IMM-359");
  Serial.println();

  lcd.setCursor(5,0);
  lcd.print("I N T E C");
  lcd.setCursor(1,1);
  lcd.print("Instrum. y Medidas");
  lcd.setCursor(2,2);              
  lcd.print("Richard Rodríguez");
  lcd.setCursor(6,3);
  lcd.print("INM-359");

  delay(3000);
  lcd.clear(); //Esperar 3000 ms y limpiar la presentacion

  lcd.setCursor(5,0);
  lcd.print("Sensor de");
  lcd.setCursor(4,1);
  lcd.print("Temperatura");
  lcd.setCursor(5,2);
  lcd.print("a base de");
  lcd.setCursor(4,3);
  lcd.print("Resistencia");

  Serial.println();
  Serial.print("Proyecto final Mediciones:");
  Serial.println();
  Serial.print("Sensor de Temperatura a base de Resistencia");
  Serial.println();

  delay(2000);
   
  if (bmp180.begin())
    Serial.println("BMP180 Iniciado Correctamente");
  else
  {
    Serial.println("Error al Iniciar el BMP180");
    while(1); // Bucle Infinito
  }
  MENU(); //Invocar Menu
}

void loop() {
  char key = kpd.getKey();
  char status;
  double T,P;

// --- Opcion Salir: Simplemente despliega el menu ---  
  if (key == 'S'){
    lcd.clear();    
    MENU(); 
  }

// --- Opcion 1: Sistema SI ----
if (key == '1'){

    status = bmp180.startTemperature();          // Inicio de lectura de temp.
    if (status != 0)
    {   
      delay(status);     // Pausa para que finalice la lectura
      status = bmp180.getTemperature(T);         // Obtener la temperatura
      if (status != 0)
      {
            status = bmp180.startPressure(3);   // Inicio lectura de presión
        if (status != 0)
        {        
          delay(status); // Pausa para que finalice la lectura        
          status = bmp180.getPressure(P,T);    // Obtenemos la presión
          if (status != 0)
          {
              
            char key = kpd.getKey();
                                  
           // Pantalla LCD
              lcd.clear();
              lcd.setCursor(0, 0);
              lcd.print("P= ");             //P
              lcd.print(P);
              lcd.print(" hPa");
              
              lcd.setCursor(0, 1); 
              lcd.print("T= ");
              lcd.print(T);                 //T
              lcd.print(" *C");

              
           // Virtual Terminla               
              Serial.println();
              Serial.print("P = ");
              Serial.print(P);              //P
              Serial.print(" hPa");
              
              Serial.println();
              Serial.print("T = ");
              Serial.print(T);              //T
              Serial.print(" *C");
              Serial.println();      

              
          }
        }
      }
    }
 }

// --- Opcion 2 Sistmea Anglosajon ---

 if (key == '2'){
    status = bmp180.startTemperature();     // Inicio de lectura de temp.
    if (status != 0)
    {   
      delay(status);     // Pausa para que finalice la lectura
      status = bmp180.getTemperature(T);    // Obtener la temperatura
      if (status != 0)
      {
        status = bmp180.startPressure(3);   // Inicio lectura de presión
        if (status != 0)
        {        
          delay(status); // Pausa para que finalice la lectura        
          status = bmp180.getPressure(P,T); // Obtenemos la presión
          if (status != 0)
          {
              
            char key = kpd.getKey();
            
              T = (T*9/5) + 32;              // Celcius a Farenheit
              P = ((100*P)/1e+6)*145.038;    // hpa -> psi
 
              // En el LCD
              lcd.clear();
              lcd.setCursor(0,0); 
              lcd.print("P = ");
              lcd.print(P);                     // Presion
              lcd.print(" psi");
              lcd.setCursor(0, 1);
              
              lcd.print("T = ");
              lcd.print(T);                    // Temperatura
              lcd.print(" *F");


              // En Virtual Terminal
              Serial.println();
              Serial.print("P = ");
              Serial.print(P);
              Serial.print(" psi");
              Serial.println();
              
              Serial.print("T = ");
              Serial.print(T);
              Serial.print(" *F");
              Serial.println();
              

          }
        }
      }
    }
 }   

// --- Opcion 3 Sensor de Temperatura ---

  if (key == '3'){
    
    lcd.clear();
    R = analogRead(0);  // BITS
    Serial.println();
    Serial.print ("BITS= ");
    Serial.print (R);
    Serial.println();
    
    lcd.setCursor(0, 0);           
    lcd.print ("BITS= ");
    lcd.print (R);

    R = 4.3626 * R - 160.62 ; // // BITS a Ohms
    Serial.print ("R= ");
    Serial.print (R);
    Serial.println(" Ohms");

    lcd.setCursor(0, 1);           
    lcd.print ("R= ");
    lcd.print (R);
    lcd.print (" Ohms");

    R = abs(1.0/( 0.04 + (log(R/100)))); // Ecuacion de Ohms a °C con T0 = 25°C y R0 = 100 Ohms
    T = (R*9/5) + 32;                    // °C -> °F                               
                                   
    Serial.print ("T = ");         
    Serial.print (R);            
    Serial.println(" *C");

    Serial.print ("T = ");         
    Serial.print (T);            
    Serial.println(" *F"); 
                                      
    lcd.setCursor(0, 2);              
    lcd.print ("T = ");            
    lcd.print (R);              
    lcd.print (" *C"); 

    lcd.setCursor(0, 3);              
    lcd.print ("T = ");            
    lcd.print (T);              
    lcd.print (" *F");                           
  } 
  
delay (530); 
}`Preformatted text`

exit status 1

'PCF8574' was not declared in this scope

The compiler told you what and where the error was, but you chose not to share.
It even put a little pointer to the problem area.

I don't understand why you would do that.

Please remember to use code tags when posting code

@bloreudyss, your topic has been moved to a more suitable location on the forum.

Although your problem might be urgent to you, please take some time to read How to get the best out of this forum and next apply what you've read / learned about code tags to the code in your post. It will make it easier to spot errors and to copy the code. Thanks.

im new in all this. im not speak englsih. doing my best from this side. how can i put the code where i can make better for you to help me

Read the forum guidelines. There you will see how to properly post code.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

You should post code by using code-tags
There is an automatic function for doing this in the Arduino-IDE
just three steps

  1. press Ctrl-T for autoformatting your code
  2. do a rightclick with the mouse and choose "copy for forum"
  3. paste clipboard into write-window of a posting

If english is not your mother-language use google-translate.

As a general recommendation: In writing programs things always take longer so start earlier and work longer per day. Skip the party and skip your favorite TV-series to have more time to finish the program in time.

best regards Stefan

Did you download the Keypad_I2C from GitHub - joeyoung/arduino_keypads: arduino libraries for keypad interface on I2C bus? Or from elsewhere?

In the above github library, PCF8574 is defined. You might either have different library (which one) or an older version that might not have PCF8574 defined. You can check the file Keypad_I2C.h if it is defined.

yes i got that one from GitHub, but let check if it is an older version. thanks

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