Tag Archives: Classes

Library for Reading a 16 Button Keypad on the Raspberry Pi

In this lesson we show you how to create a Python Class and Library that allows you to easily get user input on a Raspberry Pi from a 16 button keypad. This will allow very easy interaction with the keypad.

The Library Code which we develop in the video is presented below for your convenience:

To use this code as a library, save it in the same folder as your python programs, and save it as KPLIB.py

 

This is a simple demo program that calls the library above, to receive input from the keypad.