GithubHelp home page GithubHelp logo

jaimealbq / matrix-keyboard-for-esp-idf Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 8 KB

Library for matrix keyboard using ESP-IDF framework

License: MIT License

CMake 3.30% Makefile 2.56% C 94.14%

matrix-keyboard-for-esp-idf's Introduction

Matrix Keyboard for ESP-IDF

Library for matrix keyboard using ESP-IDF framework

How to use it?

It needed just 4 simple steps to use this library:

  1. Copy the keypad_espidf.h and keypad_espidf.c to your project;
  2. Set your keypad settings by using the keypad_settings_t structure;
  3. Install it with keypad_install(keypad_settings_t *);
  4. Use the income information with the .queue in the settings and FreeRTOS Queue.

How is it work?

Before start using your keyboard or even install it, a structure needs to be set with all configuration of your keypad.

  • keypad_settings_t
    • num_row_layout = Number of rows of the layout
    • num_col_layout = Number of columns of the layout
    • layout = Keypad layout in 2 dimensions
    • num_gpio_out = Number of output GPIOs
    • num_gpio_in = Number of input GPIOs
    • gpio_output = Pointer for the output GPIOs array
    • gpio_input = Pointer for the input GPIOs array
    • frequency = Scan frequency in Hz
    • last_output = Last order in output dimension
    • last_input = Last order in input dimension
    • queue = Queue to send this structure

After that, the installation is needed. To do so, the functions keypad_install(keypad_settings_t *) is called and the keypad configuration passed to the library. Here are setted the output and input pins, create the keypad queue, create the sequency task to scan each output, install the ISR and set the interrupt handler for each input pin.

The keypad_sequency_task(void *) makes a sequency for each output pin, by switching every pin in high level and just the select one in low. During the task is working, the ISR handler is active to store the last input pin and than send it to the keypad queue.

TODO

matrix-keyboard-for-esp-idf's People

Contributors

jaimealbq avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.