daeunlee

modify

No preview for this file type
......@@ -6,7 +6,7 @@ int state = 0;
int KeypadRead()
{
int i, keypadnum = -1;
for (i = 0; i < 2; i++) {
for (i = 0; i < 5; i++) {
if (!digitalRead(Keypad[i])) {
state = 1;
keypadnum = i; break;
......@@ -37,7 +37,7 @@ int main(void)
pinMode(LedRed[i], OUTPUT);
digitalWrite(LedRed[i], LOW);
}
for (i = 0; i < 2; i++)
for (i = 0; i < 5; i++)
pinMode(Keypad[i], INPUT);
if (wiringPiISR(Keypad[2], INT_EDGE_FALLING, &stop) < 0) {
return 1;
......