Can I use a keyboard with an ESP32 ? Or a keypad ?

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

Can I use a keyboard with an ESP32 ? Or a keypad ?

Postby GeorgeFlorian1 » Tue Nov 19, 2019 12:40 pm

Hello !

I am interested into connecting a keyboard to the ESP32. I would need to to have all the number keys, an Enter and a Backspace. Much like an ATM keyboard.

I couldn't find anything useful online, other than users saying that is very hard to implement this.

Any thoughts or ideas ? Thank you !

tommeyers
Posts: 184
Joined: Tue Apr 17, 2018 1:51 pm
Location: Santiago, Dominican Republic

Re: Can I use a keyboard with an ESP32 ? Or a keypad ?

Postby tommeyers » Tue Nov 19, 2019 2:08 pm

First, it is not difficult because there are so many examples of code and wiring and so many keypads available.

For example: "sparkfun.com 4x4 keypad"

Take a look at that first then use the search terms you see to google more or banggood or amaon or "arduino keypad"

Tom Meyers
IT Professional, Maker
Santiago, Dominican Republic

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

Re: Can I use a keyboard with an ESP32 ? Or a keypad ?

Postby GeorgeFlorian1 » Tue Nov 19, 2019 2:57 pm

tommeyers wrote:
Tue Nov 19, 2019 2:08 pm
First, it is not difficult because there are so many examples of code and wiring and so many keypads available.

For example: "sparkfun.com 4x4 keypad"

Take a look at that first then use the search terms you see to google more or banggood or amaon or "arduino keypad"

Tom Meyers
Could you point me to an actual example ? I have searched and I have no idea where to start from.
I haven't found any wiring examples and the code examples I have found are just plain code without any instructions or proper devices that would work with that respective code.

For example, this: https://gist.github.com/sabas1080/93115 ... a19f3e7787
How should this code work ?

From what I've found there can be wired, Bluetooth and WiFi keypads. Is this correct ? Do I simply plug in the keypad to the ESP and it should work with some code ?

Should this work with an ESP ? https://www.banggood.com/Small-2_4GHz-W ... rehouse=CN

or this ? https://www.banggood.com/4-x-4-16-Key-M ... rehouse=CN
Thank you.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Can I use a keyboard with an ESP32 ? Or a keypad ?

Postby PeterR » Tue Nov 19, 2019 3:26 pm

http://www.esp32learning.com/code/inter ... -esp32.php

If above does not match your need then there are plenty of I2C key pad reader/controller e.g. https://datasheets.maximintegrated.com/ ... AX7360.pdf.

From a hardware point of view you need to make sure that ESP32 and device logic levels are the same (although you could add a shifter).
Next you need a software library or write one yourself.
Most tutorials are not very detailed or even very accurate and so you will have to spend some time.

I would skip bangood and look on a hobyist website e.g. AdaFruit.
& I also believe that IDF CAN should be fixed.

tommeyers
Posts: 184
Joined: Tue Apr 17, 2018 1:51 pm
Location: Santiago, Dominican Republic

Re: Can I use a keyboard with an ESP32 ? Or a keypad ?

Postby tommeyers » Tue Nov 19, 2019 5:06 pm

Did you Google:

For example: "sparkfun.com 4x4 keypad"

... or banggood or amaon or "arduino keypad"

Tom :cry:
IT Professional, Maker
Santiago, Dominican Republic

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

Re: Can I use a keyboard with an ESP32 ? Or a keypad ?

Postby GeorgeFlorian1 » Wed Nov 20, 2019 9:40 am

PeterR wrote:
Tue Nov 19, 2019 3:26 pm
http://www.esp32learning.com/code/inter ... -esp32.php

If above does not match your need then there are plenty of I2C key pad reader/controller e.g. https://datasheets.maximintegrated.com/ ... AX7360.pdf.

From a hardware point of view you need to make sure that ESP32 and device logic levels are the same (although you could add a shifter).
Next you need a software library or write one yourself.
Most tutorials are not very detailed or even very accurate and so you will have to spend some time.

I would skip bangood and look on a hobyist website e.g. AdaFruit.
http://www.esp32learning.com/code/inter ... -esp32.php
This looks promising. If I can get the AD Keypad to work I think I can also reverse engineer it so that I can make my own custom board with proper keypads.

I will keep looking.

Thank you.

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

Re: Can I use a keyboard with an ESP32 ? Or a keypad ?

Postby GeorgeFlorian1 » Wed Nov 20, 2019 12:11 pm

PeterR wrote:
Tue Nov 19, 2019 3:26 pm
http://www.esp32learning.com/code/inter ... -esp32.php

If above does not match your need then there are plenty of I2C key pad reader/controller e.g. https://datasheets.maximintegrated.com/ ... AX7360.pdf.

From a hardware point of view you need to make sure that ESP32 and device logic levels are the same (although you could add a shifter).
Next you need a software library or write one yourself.
Most tutorials are not very detailed or even very accurate and so you will have to spend some time.

I would skip bangood and look on a hobyist website e.g. AdaFruit.
tommeyers wrote:
Tue Nov 19, 2019 5:06 pm
Did you Google:

For example: "sparkfun.com 4x4 keypad"

... or banggood or amaon or "arduino keypad"

Tom :cry:
I actually need a bigger keypad, something more like a keyboard. Something that has all the alphanumerical keys, an enter and a backspace.

Can this be done in ESP32 ? Or should I move to a Raspberry Pi Zero ?

I need something like this:
Image
https://www.aliexpress.com/item/32319513912.html

This also has an RS232 interface. So I can connect it on the serial. But will it work just like it ?
Do I simply have to connect it to the RS232 connector and then listen on the serial for a keystroke ? Identify each keystroke and make a switch based on that ?

tommeyers
Posts: 184
Joined: Tue Apr 17, 2018 1:51 pm
Location: Santiago, Dominican Republic

Re: Can I use a keyboard with an ESP32 ? Or a keypad ?

Postby tommeyers » Wed Nov 20, 2019 1:55 pm

If it has a serial interface you can read key presses from it.

Note which is Tx on the KB, note the baudrate, etc.

Do you have pinouts for the KB or a schematic.

What are the voltage levels presented and accepted

Does it respond to any commands on RX are there any config switches

Tom Meyers
IT Professional, Maker
Santiago, Dominican Republic

Who is online

Users browsing this forum: No registered users and 127 guests