<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: mpr121 raspberry pi help in Sensors</title>
    <link>https://community.nxp.com/t5/Sensors/mpr121-raspberry-pi-help/m-p/816280#M5227</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see in the&amp;nbsp;&lt;A href="http://www.nxp.com/assets/documents/data/en/product-change-notices/PCN16772.htm"&gt;PCN16772&lt;/A&gt;, the MPR121 is a discontinued product and NXP no longer supports it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, attached you can find&amp;nbsp;design guidelines including the sample code which might be helpful for your evaluation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tomas&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2018 10:36:26 GMT</pubDate>
    <dc:creator>TomasVaverka</dc:creator>
    <dc:date>2018-10-04T10:36:26Z</dc:date>
    <item>
      <title>mpr121 raspberry pi help</title>
      <link>https://community.nxp.com/t5/Sensors/mpr121-raspberry-pi-help/m-p/816279#M5226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've bought a 12 key keypad which has an mpr121 chip built in.&lt;/P&gt;&lt;P&gt;How do i read registers 0x00 and 0x01?&lt;/P&gt;&lt;P&gt;How do i signal that the rq line has been read and can reset to high/floating?&lt;/P&gt;&lt;P&gt;i've got this far with the dummy method `keypad.rq_high&lt;/P&gt;&lt;P&gt;this is my python&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import RPi.GPIO as GPIO&lt;BR /&gt;import posix&lt;BR /&gt;from fcntl import ioctl&lt;BR /&gt;import time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IOCTL_I2C_SLAVE = 0x0703&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class KEYPAD:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;def __init__(self, i2c, rq_pin, address = 0x5a): &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self._fd = posix.open('/dev/i2c-%d' % i2c, posix.O_RDWR) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ioctl(self._fd, IOCTL_I2C_SLAVE, address)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self._rq_pin=rq_pin &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GPIO.setup(self._rq_pin, GPIO.IN, GPIO.PUD_UP)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.switch_on()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;def _del_(self): &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;posix.close(self._fd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;def switch_on(self): &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;posix.write(self._fd, b'\x5e\x01')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;def rq_high(self): &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return GPIO.input(self._rq_pin) == GPIO.HIGH&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;GPIO.setmode(GPIO.BCM)&lt;/P&gt;&lt;P&gt;keypad=KEYPAD(1, 23)&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;while True: &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if keypad.rq_high(): &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print("high", end = '\r') &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else: &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print("low ", end = '\r')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;time.sleep(0.01)&lt;/P&gt;&lt;P&gt;except KeyboardInterrupt:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; pass&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print("")&lt;BR /&gt; GPIO.cleanup()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only have switched on a few keys but realise i need to write something different to register 0x5e (probably 0x3f)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2018 12:02:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/mpr121-raspberry-pi-help/m-p/816279#M5226</guid>
      <dc:creator>rhubarbdog76</dc:creator>
      <dc:date>2018-10-02T12:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: mpr121 raspberry pi help</title>
      <link>https://community.nxp.com/t5/Sensors/mpr121-raspberry-pi-help/m-p/816280#M5227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see in the&amp;nbsp;&lt;A href="http://www.nxp.com/assets/documents/data/en/product-change-notices/PCN16772.htm"&gt;PCN16772&lt;/A&gt;, the MPR121 is a discontinued product and NXP no longer supports it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, attached you can find&amp;nbsp;design guidelines including the sample code which might be helpful for your evaluation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tomas&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 10:36:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/mpr121-raspberry-pi-help/m-p/816280#M5227</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2018-10-04T10:36:26Z</dc:date>
    </item>
  </channel>
</rss>

