Keypad not working on standalone Arduino


in project using mega2560, have attached 4x4 keypad directly a0-a7 pins.
(no pull resistors or other paraphernalia)
using keypad library, working.

when built standalone version of same on pcb, not working more.
the mega2560 getting programmed. have verified taking .hex blink program , uploading it. there no problem.

this code i'm using test :
(i want toggle led, button pressed. code working fine on arduino board)

code: [select]

#include <keypad.h>

const byte rows = 4; //four rows
const byte cols = 4; //three columns
char keys[rows][cols] = {
  {'1','2','3','a'},
  {'4','5','6','b'},
  {'7','8','9','c'},
  {'*','0','#','d'}
};
byte rowpins[rows] = {a7, a6, a5, a4};
byte colpins[cols] = {a3, a2, a1,a0};
keypad keypad = keypad( makekeymap(keys), rowpins, colpins, rows, cols );

int statuspin=0;
int led = 2;

void setup(){
     pinmode(led, output);     
}

void  loop(){ 

keypad.waitforkey();

digitalwrite(led, !digitalread(led));

}
 

quote
when built standalone version of same on pcb, not working more.


what did build, keypad or arduino mega?


Arduino Forum > Using Arduino > Project Guidance > Keypad not working on standalone Arduino


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62