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.
-
Download and place in your Arduino project library
-
Include the header in your main program #include <Keypad_Helper.h> #include <Wire.h>
-
Create an instance
// Keypad Instance Keypad_Helper kpd(0x20, PCF8575);NB:
0x20 - PCF857x I2C Address
PCF8575 - Use PCF8574 otherwise -
Initialize
// Keypad init
Wire.begin();
kpd.start();
- 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);
}
- Provide examples
- Document more use cases