Mercurial > code > home > repos > homeauto
view service/busyboxArduino/DFR_Key.h @ 1139:db955e7943af
arduinonode reads config from etcd. use pushConfig.py to inform all nodes
Ignore-this: 3155d873bb30ca82b48ace7531a550e5
darcs-hash:0b2be13fbb4dc2571bb1bb8ac97f6a1350f36e77
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Sat, 03 Mar 2018 17:53:37 -0800 |
parents | 70fd4c07a326 |
children |
line wrap: on
line source
#ifndef DFR_Key_h #define DFR_Key_h #include "Arduino.h" #define SAMPLE_WAIT -1 #define NO_KEY 0 #define UP_KEY 3 #define DOWN_KEY 4 #define LEFT_KEY 2 #define RIGHT_KEY 5 #define SELECT_KEY 1 class DFR_Key { public: DFR_Key(); int getKey(); void setRate(int); private: int _refreshRate; int _keyPin; int _threshold; int _keyIn; int _curInput; int _curKey; int _prevInput; int _prevKey; boolean _change; unsigned long _oldTime; }; #endif