ESP32 POE ISO Keypad

Started by enschy, March 21, 2021, 02:01:40 pm

Previous topic - Next topic

enschy

Hello,
has somebody connected a 3x4 Keypad to the esp32_poe_iso board? I`ll tried many gpio┬┤s. Nothing happend.

Keypad: https://www.sparkfun.com/products/14662

Thanks

LubOlimex

Probably share which 7 GPIO pins do you use and also share the code you are using.
Technical support and documentation manager at Olimex

enschy

Here`s my test code:

#include "Keypad.h"
const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns

char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};

byte rowPins[ROWS] = {2, 3, 13, 14};
byte colPins[COLS] = {15, 32, 33};

Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);

void setup() {
  Serial.begin(9600);
}

void loop() {
  char key = keypad.getKey();

  if (key){
    Serial.println(key);
  }
}

I tested GPIOs: 2, 3, 13, 14, 15, 32, 33

Thanks

LubOlimex

March 23, 2021, 08:42:50 am #3 Last Edit: March 23, 2021, 08:48:34 am by LubOlimex
Do not use GPIO3, it goes to the CH340T.

GPIO2, GPIO14, GPIO15 are free to use if you don't have SD card. So make sure there is no SD card inserted.

Did you install the library required for the code?

Maybe for initial testing connect just 2 wires instead of all 7 (one for row and one for column, for example) and check only that button.

What do you select in Arduino IDE, do you see ESP32-POE-ISO in board selector?

Can you try with some other library, there seems to be a lot of libraries online for 4x3 keypads, like this one: https://lastminuteengineers.com/arduino-keypad-tutorial/ ?

Technical support and documentation manager at Olimex

enschy

March 23, 2021, 08:58:12 pm #4 Last Edit: March 23, 2021, 09:36:35 pm by enschy
Now i have used GPIO14 and 15 for row1 and col1, nothing. SDcard not insert. I have now tested like this example https://lastminuteengineers.com/arduino-keypad-tutorial/ same result. Also i have tested 14 and 15 with simple switch input (need Pulldown resistor) -> works and simple output -> works
At last i have tested your Example:
https://github.com/OLIMEX/ESP32-POE/tree/master/SOFTWARE/ESP-IDF/ESP32_PoE_Ethernet_IDFv4.0
Works out of the box.

I think the better way is to use i2c:
https://github.com/RobTillaart/I2CKeyPad
Thanks

LubOlimex

Interesting. Hmmm, a lot of things work, so probably something related to the library or the keypad.
Technical support and documentation manager at Olimex