/Arduino-PCF8575-KeyPad

Arduino Helper Library for PCF857X Interfaced Keypad

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Arduino-PCF8575-KeyPad

Arduino Helper Library for PCF857X Interfaced Keypad

It provides a higher abstraction layer for joeyoung/arduino_keypads [https://github.com/joeyoung/arduino_keypads/blob/master/Keypad_I2C/Keypad_I2C.cpp]

NB: This library supports Arduino/ESP8266.

Installation

  1. Download and place in your Arduino project library

  2. Include the header in your main program #include <Keypad_Helper.h> #include <Wire.h>

  3. Create an instance
    // Keypad Instance Keypad_Helper  kpd(0x20, PCF8575);

    NB:
    0x20 - PCF857x I2C Address
    PCF8575 - Use PCF8574 otherwise

  4. Initialize


// Keypad init
Wire.begin();
kpd.start();

Use cases:

  1. Text Input

kpd.getText(10000, &FpDebug)

NB:
1000 - timeout in milliseconds
FpDebug - a simple callback for debugging

// Debug Callback
void FpDebug(const char* s){
  Serial.print(s);
}

TODO:

  1. Provide examples
  2. Document more use cases