Skip to content

Commit 6db4a83

Browse files
authored
Merge pull request #8 from ladyada/master
add repeated start support
2 parents ddf3b79 + 475afb0 commit 6db4a83

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

adafruit_mpr121.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def _read_register_bytes(self, register, result, length=None):
100100
if length is None:
101101
length = len(result)
102102
with self._i2c:
103-
self._i2c.write(bytes([register]), stop=False)
104-
self._i2c.readinto(result, start=0, end=length)
103+
self._i2c.write_then_readinto(bytes([register]), result,
104+
in_end=length, stop=False)
105105

106106
def reset(self):
107107
"""Reset the MPR121 into a default state ready to detect touch inputs.

examples/piano.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# MPR121 piano demo.
22
# Listens to the first 7 inputs of the MPR121 and plays a middle scale note
33
# when an input is touched. Note only one note is played at a time!
4+
# For use with microcontrollers or computers with PWM support only!
45
# Author: Tony DiCola
56
import time
67

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Adafruit-Blinka
2-
adafruit-circuitpython-busdevice
2+
adafruit-circuitpython-busdevice>=2.2.5

0 commit comments

Comments
 (0)