1

I have ESP8266 type - enter image description here

I have added a keypad enter image description here

With a standard lcd display.

I have connected the keypad from d0 to d7, however after watching some tutorials i have to connect the lcd display(SDA,SCL) to D0 and D1, where i should connect the display to when they are taken by the keypad?

asked Aug 3, 2017 at 19:12

1 Answer 1

0

You can read the keypad using a single analog input (A0 in ESP8266) using this circuit:

keypad resistor array

When you press a key, some resistors are connected between Vcc and Ground. For each key, the total resistence is different, and the voltage at the input pin is different.

To read the keypad, you read the voltage at the input pin A0. You also have a table that associate the readings with keys. You search in the table for the nearest entry to the value you get. That's your key.

Wire the circuit and make a little sketch to read the values for each key you press. That's how you construct your table.

The value at A0 will be a little different each time you read the pin. That's is normal. Don't expect a exact macht.

answered Aug 3, 2017 at 19:38
1
  • This won't work! the ADC of ESP is in range 0.0-1.0v! Commented Mar 9, 2018 at 16:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.