These are chat archives for esp8266/Arduino

15th
Oct 2017
Mehrdad K
@mkeyno
Oct 15 2017 21:18
hi guys , I'm trying use 3x3 keypad with 6 ESP8266 pins and Arduino Keypad Library , according to its library, row pins set input pullup and column Pins set output and LOW and in pool all output pins versus input pins will be checked , but after running the following sketch, notice only couple of key combination works (2&16 ->e 0&16->h) any clue really appreciated
#include <Keypad.h>

const byte ROWS = 3; //four rows
const byte COLS = 3; //four columns
//define the cymbols on the buttons of the keypads
char myKeys[ROWS][COLS] = {
 //16   12  4
  {'a','b','c' }, //5
  {'d','e','f' }, //2
  {'g','h','i' } //0
};
byte row_Input_pullup_Pins[ROWS] = {5, 2, 0}; //connect to the row pinouts of the keypad
byte output_low_state_colPins[COLS] = {16, 12, 4}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(myKeys), row_Input_pullup_Pins, output_low_state_colPins, ROWS, COLS); 

void setup(){
  Serial.begin(115200);
  Serial.println("\n\n\nStarting.........");
}

void loop(){
  char customKey = customKeypad.getKey();

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