exit status 1 'ROW' was not declared in this scope

// Include Libraries
#include "Arduino.h"
#include "Keypad.h"

// Pin Definitions
#define KEYPADMEM3X4_PIN_ROW1 5
#define KEYPADMEM3X4_PIN_ROW2 6
#define KEYPADMEM3X4_PIN_ROW3 7
#define KEYPADMEM3X4_PIN_ROW4 8
#define KEYPADMEM3X4_PIN_COL1 2
#define KEYPADMEM3X4_PIN_COL2 3
#define KEYPADMEM3X4_PIN_COL3 4
#define SEVENSEGSINGLE_PIN_DP 13
#define SEVENSEGSINGLE_PIN_C 11
#define SEVENSEGSINGLE_PIN_D 12
#define SEVENSEGSINGLE_PIN_E A3
#define SEVENSEGSINGLE_PIN_B 10
#define SEVENSEGSINGLE_PIN_A 9
#define SEVENSEGSINGLE_PIN_F A1
#define SEVENSEGSINGLE_PIN_G A5

// Global variables and defines
//Use this 2D array to map the keys as you desire
char keypadmem3x4keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
//define an array for all the segments
int SevenSegSinglePins[] = { SEVENSEGSINGLE_PIN_DP, SEVENSEGSINGLE_PIN_C, SEVENSEGSINGLE_PIN_D, SEVENSEGSINGLE_PIN_E, SEVENSEGSINGLE_PIN_B, SEVENSEGSINGLE_PIN_A, SEVENSEGSINGLE_PIN_F, SEVENSEGSINGLE_PIN_G };
// object initialization
Keypad keypadmem3x4(KEYPADMEM3X4_PIN_COL1,KEYPADMEM3X4_PIN_COL2,KEYPADMEM3X4_PIN_COL3,KEYPADMEM3X4_PIN_ROW1,KEYPADMEM3X4_PIN_ROW2,KEYPADMEM3X4_PIN_ROW3,KEYPADMEM3X4_PIN_ROW4);

// define vars for testing menu
const int timeout = 10000; //define timeout of 10 sec
char menuOption = 0;
long time0;

// Setup the essentials for your circuit to work. It runs first every time your circuit is powered with electricity.
void setup()
{
// Setup Serial which is useful for debugging
// Use the Serial Monitor to view printed messages
Serial.begin(9600);
while (!Serial) ; // wait for serial port to connect. Needed for native USB
Serial.println("start");

//Initialize the keypad with selected key map
keypadmem3x4.begin(keypadmem3x4keys);
pinMode(SEVENSEGSINGLE_PIN_DP, OUTPUT);
pinMode(SEVENSEGSINGLE_PIN_C, OUTPUT);
pinMode(SEVENSEGSINGLE_PIN_D, OUTPUT);
pinMode(SEVENSEGSINGLE_PIN_E, OUTPUT);
pinMode(SEVENSEGSINGLE_PIN_B, OUTPUT);
pinMode(SEVENSEGSINGLE_PIN_A, OUTPUT);
pinMode(SEVENSEGSINGLE_PIN_F, OUTPUT);
pinMode(SEVENSEGSINGLE_PIN_G, OUTPUT);
//turn off all segments:
for (int i = 0; i < 8; i++) {
digitalWrite(SevenSegSinglePins*,HIGH);*

  • }*
  • menuOption = menu();*

}
// Main logic of your circuit. It defines the interaction between the components you selected. After setup, it runs over and over again, in an eternal loop.
void loop()
{

  • if(menuOption == '1') {*
  • // Membrane 3x4 Matrix Keypad - Test Code*
  • //Read keypad*
  • char keypadmem3x4Key = keypadmem3x4.getKey();*
    _ if (isDigit(keypadmem3x4Key) || keypadmem3x4Key == '*' || keypadmem3x4Key == '#')_
  • {*
  • Serial.print(keypadmem3x4Key);*
  • }*
  • }*
  • else if(menuOption == '2') {*
  • // 7 - Segment Display (Single Digit) - Test Code*
  • //This loop will turn on and off each segment in the array for 0.5 sec*
  • for (int i = 0; i < 8; i++) {*
    _ digitalWrite(SevenSegSinglePins*,LOW);_
    _
    delay(500);_
    _
    }_
    _
    for (int i = 0; i < 8; i++) {_
    _ digitalWrite(SevenSegSinglePins,HIGH);
    }
    }*_

* if (millis() - time0 > timeout)*
* {*
* menuOption = menu();*
* }*

}
// Menu function for selecting the components to be tested
// Follow serial monitor for instrcutions
char menu()
{
* Serial.println(F("\nWhich component would you like to test?"));*
* Serial.println(F("(1) Membrane 3x4 Matrix Keypad"));*
* Serial.println(F("(2) 7 - Segment Display (Single Digit)"));*
* Serial.println(F("(menu) send anything else or press on board reset button\n"));*
* while (!Serial.available());*
* // Read data from serial monitor if received*
* while (Serial.available())*
* {*
* char c = Serial.read();*
* if (isAlphaNumeric(c))*
* { *

* if(c == '1')*
* Serial.println(F("Now Testing Membrane 3x4 Matrix Keypad"));*
* else if(c == '2')*
* Serial.println(F("Now Testing 7 - Segment Display (Single Digit)"));*
* else*
* {*
* Serial.println(F("illegal input!"));*
* return 0;*
* }*
* time0 = millis();*
* return c;*
* }*
* }*
}

I'm not convinced that's the actual error message but if it is then it seems fairly clear. The compiler doesn't think ROW is defined anywhere. Where do you think ROW is defined?

Please post the COMPLETE error messages not your paraphrase of them.

Steve

You are missing a bunch of lines from the HelloKeypad example:

/////// These two declarations are missing //////
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','#'}
};


/////// These two arrays are missing //////
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad


/////// Your declaration of the keypad doesn't look much like this example //////

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