Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This program runs on Raspberry pi plus the Adafruit RGB 16x2 LCD+Keypad Kit
- The purpose of this program is to use the interrupts instead of constantly polling the
- Buttons. This is a modifiation of Adafruit_CharLCDPlate.py. We enable the interrupts on
- both the MCP23017 AND the Raspberry Pi GPIO. Then we electrically link them:
- The MCP23017 INTA pin is connected to Raspberry pi GPIO 23 through a resistor divider,
- to reduce the MCP23017 5V to an acceptable level for the pi.
- +----------------------+
- | | +---------+ +-----------+
- | MCP23017 20|+------->| 680 Ohms|+--+--->| 820 Ohms |<-------+ GND
- | | +---------+ | +-----------+
- +----------------------+ v
- GPIO 23
- Just make sure you have the latest RPi.GPIO version https://pypi.python.org/pypi/RPi.GPIO
- Then run this software:
- $ sudo python UseInterruptGPIO.py
- and press the buttons..
- Interrupts do it better:-)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement