contact closure to send usb keypad function


i using arduino uno project. trying use contact closure trigger uno send charter 9. have figured digital pin 2 needs connected contact trigger response on uno. tx light flashes, nothing happens. brand new @ programming, , have learned whole lot lately, need little guidance figure out. thanks.

#include <keypad.h>

const byte rows = 1; //four rows
const byte cols = 1; //three columns
char keys[rows][cols] =
{
  {'9'},
};
byte rowpins[rows] = {2}; //connect row pinouts of keypad
byte colpins[cols] = {6}; //connect column pinouts of keypad

keypad keypad = keypad(makekeymap(keys), rowpins, colpins, rows, cols );


void setup()
{
  serial.begin(9600);
}
 
void loop()
{
  char key = keypad.getkey();
 
  if (int(key) != 0){
    serial.println(key);
  }
}

have opened serial monitor @ output?

is set same baud rate?

why using matrix key pad code simple contact closure? digital read do.


Arduino Forum > Using Arduino > Project Guidance > contact closure to send usb keypad function


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support