'PCF8574' was not declared in this scope

i want serial print the digit i press in key pad 4*4 using i2c PCF8574 module

/* @file HelloKeypad.pde

   Revised to use I2C i/o Feb 26/12 - G. D. Young
   Re-check with Keypad 3.0, arduino 1.0.1 Jul 29/12
   Add port-type parameter to constructor for Paul
   Williamson's modification of the Keypad_I2C library Sept 2/13

|| @version 1.0
|| @author Alexander Brevig
|| @contact alexanderbrevig@gmail.com
||
|| @description
|| | Demonstrates the simplest use of the matrix Keypad library.
|| #
*/
#include <Keypad_I2C.h>
#include <Keypad.h>
#include <Wire.h>
#define I2CADDR 0x20

const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};
// Digitran keypad, bit numbers of PCF8574 i/o port
byte rowPins[ROWS] = {0, 1, 2, 3}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {4, 5, 6}; //connect to the column pinouts of the keypad

Keypad_I2C kpd( makeKeymap(keys), rowPins, colPins, ROWS, COLS, I2CADDR, PCF8574 );

void setup(){
  Wire.begin( );
  kpd.begin( makeKeymap(keys) );
  Serial.begin(9600);
  Serial.println( "start" );
}
void loop(){
  
  char key = kpd.getKey();
  
  if (key){
    Serial.println(key);
  }
}
C:\Users\pgnan\Downloads\A13_KeyPad\I2C_KeyPad\I2C_KeyPad.ino:33:74: error: 'PCF8574' was not declared in this scope
 Keypad_I2C kpd( makeKeymap(keys), rowPins, colPins, ROWS, COLS, I2CADDR, PCF8574 );
                                                                          ^~~~~~~
C:\Users\pgnan\Downloads\A13_KeyPad\I2C_KeyPad\I2C_KeyPad.ino: In function 'void setup()':
C:\Users\pgnan\Downloads\A13_KeyPad\I2C_KeyPad\I2C_KeyPad.ino:37:31: error: no matching function for call to 'Keypad_I2C::begin(char*)'
   kpd.begin( makeKeymap(keys) );
                               ^
In file included from C:\Users\pgnan\Downloads\A13_KeyPad\I2C_KeyPad\I2C_KeyPad.ino:16:0:
c:\Users\pgnan\OneDrive\Documents\Arduino\libraries\libraries\Keypad_I2C-master/Keypad_I2C.h:30:14: note: candidate: void Keypad_I2C::begin()
         void begin();
              ^~~~~
c:\Users\pgnan\OneDrive\Documents\Arduino\libraries\libraries\Keypad_I2C-master/Keypad_I2C.h:30:14: note:   candidate expects 0 arguments, 1 provided
Multiple libraries were found for "Wire.h"
  Used: C:\Users\pgnan\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire
  Not used: C:\Users\pgnan\OneDrive\Documents\Arduino\libraries\libraries\Wire
exit status 1

Compilation error: 'PCF8574' was not declared in this scope

Look for an Arduino library for that module, and start with a library example. The search phrase "arduino pcf8574 library" will be useful.

Your topic has been moved. Please do not post in "Uncategorized"; see the sticky topics in Uncategorized - Arduino Forum.

That is a strange directory.

Did you install the library according to the IDE instructions?

What version of the IDE are you using?

i am using 2.3.2 version

can you guide me
i want to use keypad 4*4 with i2c PCF8574 module
to serial print the digit i press on keypad

See post #2.

... and you will find many links, this one looks good:

It has a beautiful asciimatic...

         PROCESSOR         PCF8574              KEYPAD
        +--------+        +--------+          +--------+
        |        |        |       0|----------|R       |
        |    SDA |--------|       1|----------|O       |
        |    SCL |--------|       2|----------|W       |
        |        |        |       3|----------|S       |
        |        |        |        |          |        |
        |        |        |       4|----------|C       |
        |        |        |       5|----------|O       |
        |        |        |       6|----------|L       |
        |        |        |       7|----------|S       |
        +--------+        +--------+          +--------+ 

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