comparison service/busyboxArduino/DFR_Key.h @ 962:70fd4c07a326

busybox py and arduino Ignore-this: eea165c21e11600b5ac6787cbbb2239 darcs-hash:20150120020247-312f9-8977dd56e356d2752bc2cdf574aa37cef2036329
author drewp <drewp@bigasterisk.com>
date Mon, 19 Jan 2015 18:02:47 -0800
parents
children
comparison
equal deleted inserted replaced
961:be320b224bda 962:70fd4c07a326
1 #ifndef DFR_Key_h
2 #define DFR_Key_h
3
4 #include "Arduino.h"
5
6 #define SAMPLE_WAIT -1
7 #define NO_KEY 0
8 #define UP_KEY 3
9 #define DOWN_KEY 4
10 #define LEFT_KEY 2
11 #define RIGHT_KEY 5
12 #define SELECT_KEY 1
13
14 class DFR_Key
15 {
16 public:
17 DFR_Key();
18 int getKey();
19 void setRate(int);
20 private:
21 int _refreshRate;
22 int _keyPin;
23 int _threshold;
24 int _keyIn;
25 int _curInput;
26 int _curKey;
27 int _prevInput;
28 int _prevKey;
29 boolean _change;
30 unsigned long _oldTime;
31 };
32
33 #endif