I feel like designing a keyboard, so let's reuse an old esp32 dev board with a screen to get to it.
KeyboardWe start with a development board with holes in it. on it we are going to solder 18 switches, six rows of three.
Four columns are smaller to be able to mark the difference with the other two, higher.
The boardWe connect it to a board that has an esp32 with a 16850 battery charger and a small monochrome screen.
We connect the keyboard to the board, like a normal keypad. the rows will be the ones that we put in hight and we see if the columns have been activated to see which is the button that works.
We have also put a resistor to divide the battery voltage and so we can measure the voltage on pin 35
The program we use to read the keyboard is keypad.py, simple. We read the array of buttons and return the value that we have associated with it in an array. As we have few keys we make them multifunction. A global variable allows us to choose which 'mode' we give to the key. the lower-left key allows us to choose this mode. We show on the screen the mode we are in. For now, we have a calculator, for numbers and elementary operations, functions, for mathematical functions, and alpha to enter the letters to which we can assign values (variables)
The lower center key deletes a character for us, the lower right key is multifunction, depending on the mode it allows us to evaluate an expression, execute an assignment to a variable or display a simple graph. If we assign to the variable F a function of x, we can make a simple graph.
Comments
Please log in or sign up to comment.