brettmclean / pad4pi

Interrupt-based matrix keypad library for Raspberry Pi
GNU Lesser General Public License v3.0
51 stars 19 forks source link

improved example #6

Closed ReSearchITEng closed 6 years ago

ReSearchITEng commented 6 years ago

Thanks for your great library!!! Here is an improved example. I hope some people will appreciate.

brettmclean commented 6 years ago

Hi ReSearchITEng,

Thank you for your contribution. However, I would like to keep the README example simple to ensure developers can understand as quickly as possible whether pad4pi meets their needs.

I assume users of this library already have a basic knowledge of Python and that they would know how to integrate the README code snippet into their project. If a developer needs an example with a full working script, they can check out rpi_gpio_demo.py (it includes similar looping code to your README example).

In the interest of keeping the README focused on the pad4pi integration points, I prefer to keep the printKey implementation very short (it should be clear to potential developers that they can change this method) and avoid dependencies on other modules (I don't want developers to think they need to understand the subprocess or shlex modules in order to use pad4pi).

Again, thank you for your pull request. I hope that pad4pi has been valuable in your projects.