NXShield  v1.07
NXShield Library Reference by OpenElectrons.com
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
NumericPad.h
1 // NumericPad.h
2 //
3 // This is a class for reading from NumericPad, made by Mindsensors.
4 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=138
5 
6 // Initial version: 2011-07-19 by Michael Giles
7 // Large parts of the code is ported from the NXC library for the device,
8 // written by Deepak Patil.
9 
10 /*
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Lesser General Public
13  License as published by the Free Software Foundation; either
14  version 2.1 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Lesser General Public License for more details.
20 
21  You should have received a copy of the GNU Lesser General Public
22  License along with this library; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25 
26 
27 #ifndef NumericPad_H
28 #define NumericPad_H
29 
30 #include "NXShieldI2C.h"
31 
35 class NumericPad : public NXShieldI2C
36 {
37 public:
39  NumericPad(uint8_t i2c_address = 0xB4);
40 
44  void InitializeKeypad();
45 
52  bool GetKeyPress(int waitPeriod/* seconds */, byte &keyHolder);
53 
59  int GetKeysPressed();
60 
61 };
62 
63 #endif /* NumericPad_H_ */
This class implements I2C interfaces used by NXShield.
Definition: NXShieldI2C.h:32
int GetKeysPressed()
Definition: NumericPad.cpp:115
bool GetKeyPress(int waitPeriod, byte &keyHolder)
Definition: NumericPad.cpp:75
NumericPad(uint8_t i2c_address=0xB4)
Definition: NumericPad.cpp:48
This class interfaces with NumericPad attached to NXShield.
Definition: NumericPad.h:35
void InitializeKeypad()
Definition: NumericPad.cpp:53