EasyManuals Logo

Freenove Ultimate Starter Kit User Manual

Freenove Ultimate Starter Kit
286 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #246 background imageLoading...
Page #246 background image
Chapter 22 Matrix Keypad
246
www.freenove.com
support@freenove.com
The library Keypad used for RPi is transplanted from the Arduino library Keypad. The source files is written by
language C++ and translated to Python can be obtained by visiting
http://playground.arduino.cc/Code/Keypad. As for transplanted function library, the function and method of
all classes, functions, variables, etc. are the same as the original library. Partial contents of the Keypad library
are described below:
cl ass K eypad
def __init__(self,usrKeyMap,row_Pins,col_Pins,num_Rows,num_Cols):
Constructed function, the parameters are: key code of keyboard, row pin, column pin, the number of rows,
the number of columns.
def getKey(self):
Get a pressed key. If no key is pressed, the return value is keypad NULL.
def setDebounceTime(self,ms):
Set the debounce time. And the default time is 10ms.
def setHoldTime(self,ms):
Set the time when the key holds stable state after pressed.
def isPressed(keyChar):
Judge wether the key with code "keyChar" is pressed.
def waitForKey():
Wait for a key to be pressed, and return key code of the pressed key.
def getState():
Get state of the keys.
def keyStateChanged():
Judge whether there is a change of key state, then return True or False.
For More information about Keypad, please visit: http://playground.arduino.cc/Code/Keypad or through the
opening file "Keypad.py".

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Freenove Ultimate Starter Kit and is the answer not in the manual?

Freenove Ultimate Starter Kit Specifications

General IconGeneral
BrandFreenove
ModelUltimate Starter Kit
CategorySingle board computers
LanguageEnglish