micropython-simple-keypad


Namemicropython-simple-keypad JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/PerfecXX/MicroPython-SimpleKeypad
SummaryMicroPython library for interfacing with a keypad matrix
upload_time2024-02-07 02:34:40
maintainerTeeraphat Kullanankanjana
docs_urlNone
authorTeeraphat Kullanankanjana
requires_python
licenseMIT
keywords keypad esp32 esp8266 micropython
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            MicroPython Simple Keypad
=========================

|MicroPython| |License|

MicroPython library for interfacing with a keypad matrix

Feature
-------

-  Supports any keypad matrix configuration.
-  Easily customizable for different keypad layouts.
-  Provides exception handling for error management.

Example Usage
-------------

Example for 4x4 keypad metrix on MicroPython esp32.

.. code:: python

   from machine import Pin
   from keypad import Keypad
   from time import sleep

   # Define GPIO pins for rows
   row_pins = [Pin(25),Pin(26),Pin(27),Pin(14)]

   # Define GPIO pins for columns
   column_pins = [Pin(23),Pin(22),Pin(19),Pin(18)]

   # Define keypad layout
   keys = [
       ['1', '2', '3', 'A'],
       ['4', '5', '6', 'B'],
       ['7', '8', '9', 'C'],
       ['*', '0', '#', 'D']]

   keypad = Keypad(row_pins, column_pins, keys)

   while True:
       key_pressed = keypad.read_keypad()
       if key_pressed:
           print("Key pressed:", key_pressed)
       sleep(0.1)  # debounce and delay

.. |MicroPython| image:: https://img.shields.io/badge/MicroPython-Ready-brightgreen.svg
.. |License| image:: https://img.shields.io/badge/License-MIT-blue.svg
   :target: https://opensource.org/licenses/MIT



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PerfecXX/MicroPython-SimpleKeypad",
    "name": "micropython-simple-keypad",
    "maintainer": "Teeraphat Kullanankanjana",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "ku.teeraphat@hotmail.com",
    "keywords": "keypad,esp32,esp8266,micropython",
    "author": "Teeraphat Kullanankanjana",
    "author_email": "ku.teeraphat@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0e/49/8e665e0c89488e72bd6e0826b2d05ff64ed00cf8db84a3dd925afd20c55e/micropython-simple-keypad-1.0.3.tar.gz",
    "platform": null,
    "description": "MicroPython Simple Keypad\r\n=========================\r\n\r\n|MicroPython| |License|\r\n\r\nMicroPython library for interfacing with a keypad matrix\r\n\r\nFeature\r\n-------\r\n\r\n-  Supports any keypad matrix configuration.\r\n-  Easily customizable for different keypad layouts.\r\n-  Provides exception handling for error management.\r\n\r\nExample Usage\r\n-------------\r\n\r\nExample for 4x4 keypad metrix on MicroPython esp32.\r\n\r\n.. code:: python\r\n\r\n   from machine import Pin\r\n   from keypad import Keypad\r\n   from time import sleep\r\n\r\n   # Define GPIO pins for rows\r\n   row_pins = [Pin(25),Pin(26),Pin(27),Pin(14)]\r\n\r\n   # Define GPIO pins for columns\r\n   column_pins = [Pin(23),Pin(22),Pin(19),Pin(18)]\r\n\r\n   # Define keypad layout\r\n   keys = [\r\n       ['1', '2', '3', 'A'],\r\n       ['4', '5', '6', 'B'],\r\n       ['7', '8', '9', 'C'],\r\n       ['*', '0', '#', 'D']]\r\n\r\n   keypad = Keypad(row_pins, column_pins, keys)\r\n\r\n   while True:\r\n       key_pressed = keypad.read_keypad()\r\n       if key_pressed:\r\n           print(\"Key pressed:\", key_pressed)\r\n       sleep(0.1)  # debounce and delay\r\n\r\n.. |MicroPython| image:: https://img.shields.io/badge/MicroPython-Ready-brightgreen.svg\r\n.. |License| image:: https://img.shields.io/badge/License-MIT-blue.svg\r\n   :target: https://opensource.org/licenses/MIT\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MicroPython library for interfacing with a keypad matrix",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/PerfecXX/MicroPython-SimpleKeypad"
    },
    "split_keywords": [
        "keypad",
        "esp32",
        "esp8266",
        "micropython"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e498e665e0c89488e72bd6e0826b2d05ff64ed00cf8db84a3dd925afd20c55e",
                "md5": "453ce974b02b7f90f78b9c02b04fd8c9",
                "sha256": "96007d51efa91b3c7c838953326ddfd4dad9a53cf77ec6acd09f38c3ea776ac6"
            },
            "downloads": -1,
            "filename": "micropython-simple-keypad-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "453ce974b02b7f90f78b9c02b04fd8c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3510,
            "upload_time": "2024-02-07T02:34:40",
            "upload_time_iso_8601": "2024-02-07T02:34:40.012760Z",
            "url": "https://files.pythonhosted.org/packages/0e/49/8e665e0c89488e72bd6e0826b2d05ff64ed00cf8db84a3dd925afd20c55e/micropython-simple-keypad-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-07 02:34:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PerfecXX",
    "github_project": "MicroPython-SimpleKeypad",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "micropython-simple-keypad"
}
        
Elapsed time: 0.18494s