Skip to content

Commit 09238ac

Browse files
authored
Update README.md
1 parent cd2a9a4 commit 09238ac

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MicroPython ESP8266/ESP32 Driver for TTP229-BSF 16-key Capacitive Keypad in Serial Interface Mode
22

3-
This MicroPython driver is for TTP229-BSF capacitive keypad on ESP8266/ESP3. Tested on both ESP8266 (WeMos D1 mini) and ESP32 (BPI:bit) with v1.11 firmware.
3+
This MicroPython driver is for TTP229-BSF capacitive keypad on ESP8266/ESP32. Tested on both ESP8266 (WeMos D1 mini) and ESP32 (BPI:bit) with v1.11 firmware.
44

55
The serial interface of TTP229-BSF <b>is not I2C</b> but it allows you to control this keypad via only 2 wires. Not to be confused with TTP229-LSF, which is a true I2C device.
66

@@ -44,7 +44,9 @@ while True:
4444
# return a list like (0, 2, 11, 15) in multiple mode
4545
```
4646

47-
<b>input</b> parameter:
47+
## Parameter
48+
49+
You can set the following initializing parameter:
4850

4951
* **input=8** (default): 8 key mode
5052
* **input=16**: 16 key mode
@@ -54,13 +56,13 @@ while True:
5456
* **multi=False** (default): single mode
5557
* **multi=True**: multiple mode
5658

57-
In single mode keypad.read() will return the index of the pressed key (0~15). Return -1 when no key is pressed.
59+
In single mode ```keypad.read()``` will return the index of the pressed key (0~15). Return -1 when no key is pressed.
5860

59-
In multiple mode keypad.read() will return a list containing all the indexes of pressed keys. Return an empty list when no key is pressed.
61+
In multiple mode ```keypad.read()``` will return a list containing all the indexes of pressed keys. Return an empty list when no key is pressed.
6062

6163
If the TTP229-BSF is configured to multiple mode, read it in single mode will return the lowest index of all pressed keys. Read in multiple mode for a keypad configured in single mode, you'll get a list containing only one key index if any key is pressed.
6264

63-
There's also a <b>raw</b> parameter, default False. When set as True, keypad.read() will return the raw 8 or 16 key list indicating all keys' status (from key 0 to 15; value 1 = not pressed, 0 = pressed).
65+
There's also a <b>raw</b> parameter, default ```False```. When set as ```True```, ```keypad.read()``` will return the raw 8 or 16 key list indicating all keys' status (from key 0 to 15; value 1 = not pressed, 0 = pressed).
6466

6567
```python
6668
keypad = Keypad(scl=scl_pin, sdo=sdo_pin, inputs=16, multi=False, raw=True)
@@ -70,4 +72,4 @@ while True:
7072
print(keypad.read())
7173
```
7274

73-
If the keypad is configured to multiple mode and you read it in single/raw mode, you'll still get a list which shows multiple key pressing results.
75+
If the keypad is configured to multiple mode and you read it in single/raw mode, you'll still get a list which contains multiple key pressing results.

0 commit comments

Comments
 (0)