Skip to content

Commit ee864c0

Browse files
authored
Merge pull request #1 from neu-rah/master
Update from source
2 parents ab7b4f9 + 5d8b41a commit ee864c0

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ cache:
2626
env:
2727
- PLATFORMIO_CI_SRC=examples/Blink/Blink/Blink.ino
2828
- PLATFORMIO_CI_SRC=examples/Serial/serialio/serialio/serialio.ino
29-
- PLATFORMIO_CI_SRC=examples/Serial/ansiSerial/ansiSerial/ansiSerial.ino
29+
# - PLATFORMIO_CI_SRC=examples/Serial/ansiSerial/ansiSerial/ansiSerial.ino
3030
- PLATFORMIO_CI_SRC=examples/codeCtrl/codeCtrl/codeCtrl.ino
3131
- PLATFORMIO_CI_SRC=examples/adafruitGfx/lcdMono/lcdMono/lcdMono.ino
3232
- PLATFORMIO_CI_SRC=examples/adafruitGfx/tft/tft/tft.ino

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ Matrix keypad
261261
http://playground.arduino.cc/Code/Keypad
262262
https://github.com/Nullkraft/Keypad
263263
264+
PCF8574 based i2c matrix keypad
265+
https://github.com/whatnick/i2ckeypad
266+
264267
User defined input calling menu navigation API
265268
266269
Web browser (experimental) when using ESP devices

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ArduinoMenu library
2-
version=4.13.4
2+
version=4.14.0
33
author=Rui Azevedo, [email protected]
44
maintainer=neu-rah, [email protected]
55
sentence=Generic menu/interactivity system

src/menuIO/I2CkeypadIn.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* -*- C++ -*- */
2+
/**************
3+
Jan. 2018 Rui Azevedo - ruihfazevedo(@rrob@)gmail.com
4+
5+
I2C keypad driver
6+
using
7+
https://github.com/whatnick/i2ckeypad
8+
9+
Note: you may be need to adjust keypad-to-pcf8574 pin mappings and keymap in i2ckeypad.cpp for your specific keypad.
10+
11+
***/
12+
13+
#ifndef RSITE_I2CKEYPAD_DEF_H
14+
#define RSITE_I2CKEYPAD_DEF_H
15+
#include "../menuDefs.h"
16+
17+
#include <i2ckeypad.h>
18+
namespace Menu {
19+
20+
class I2CkeypadIn:public menuIn {
21+
public:
22+
char key=0;
23+
i2ckeypad * in;
24+
I2CkeypadIn(i2ckeypad * in):in(in) {}
25+
int available(void) {
26+
return peek()!=0;
27+
}
28+
int peek(void) {
29+
return key != 0 ? key : (key=in->get_key()) ?key : 0;
30+
}
31+
int read() {
32+
if (key != 0) {
33+
char k=key;
34+
key=0;
35+
return k;
36+
}
37+
return available()?read():0;
38+
}
39+
void flush() {}
40+
size_t write(uint8_t v) {return 0;}
41+
};
42+
};
43+
#endif

0 commit comments

Comments
 (0)