my #included class objects not declared in scope of my sketch

I tried and tried but I can’t get my sketch to recognize the member functions of class “my”.

Here is part of the sketch… it’s too big to include in-line.

#define FUNCTIONS_TO_DEBUG
#define XXXX a

int udpTimeOut = 800;
int debugOn = 0;
#define CLIENT_MODE client //Insecure mode
//#define CLIENT_MODE clients //secure mode


#include <EEPROM.h>
#include <WString.h>
#include <Arduino.h>
#include <ESP8266WiFi.h>
//#include <ESP8266WiFiMulti.h>
#include <WiFiUdp.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>
#include "my.h"


[TRUNCATED]
char *ssid = "JMR";

char *password;
//int p = 10;
//password = &p;


//IPAddress smtp_serverIP(67,195,228,95);


long TIMEOUT = 5000;
String subject;
String body = "Default";
int smtpStep;
String lastIssueOld;

IPAddress ip(192, 168, 1, 139);


// An EthernetUDP instance to let us send and receive packets over UDP
WiFiUDP Udp;
WiFiClient client;
WiFiClientSecure clients;
HTTPClient http;
WiFiUDP ntpUDP;
NTPClient NTP(ntpUDP);
my m;


void setup() {
  Serial.begin(115200);
  Serial.print(versionNumber());
  char msgOut[200];
  char c[2];

  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(2, OUTPUT);
  Serial.println("Node9 Starting...");

  // start the Ethernet and UDP:
  wifiSetup();
  timeInit();
  eventAdd();
  long y;

  String lastIssue = m.m.eGetS("lastIssue");
  long lastIssueMS = m.eGetL("lastIssueMS");

  udpBegin();
  debugQuery();
  dailyEmailQuery();
  statusReport();
}
void loop() {
  // if there's data available, read a packet
  timeGet();
  udpRead();
  udpRead2();
  newData = 0;
  recvWithEndMarker();
  if (newData == 1) {
    m.sendUDP(receivedChars, 7);
  }
  for (int i = 0; i < 11; i++) {
    Serial.print(i);
    if (installedNodes[i] == 1) {
      pingTimers(i);
    }
  }
  Serial.print("preQueue");
  statusReportQueue();
  newIssue();
  Serial.print(147);
  if (millis() - pingOutMS > 4000) {
    pingOut();
    pingOutMS = millis();
  }

  delay(10);

}

const char versionDate[] = "__DATE__";
const char versionTime[] = "__TIME__";
const char compileFileName[] = "__file__";

char *versionNumber() {
  int v = 11;
  versionNumber = &v;

  // 13.01.01
  char* filePtr[12];
  int m = 10;
  filePtr = &m;
  // char *cVersion;
  // int c = 10;
  // cVersion = &c;
  int versionNumber[4];

  filePtr[0] = compileFileName;

  filePtr[1] = strtok(filePtr[0], "\/-");
  while (filePtr[i] != NULL) {
    i++;
    filePtr[i] = strtok(NULL, "\/-");
    if (i > 10) {
      break;
    }
  }
  //FilePtr[i] is now null, last token found.
  filePtr[11] = filePtr[i - 1];

  //if day has changed, update v2
  //get day of month from versionDate

  int *intDate[4];
  int id = 10;
  intDate = &id;
  intDate = dateExtract(versionDate);
  int intDay = intDate[1];
if (m.eGetI("lastVersionDayXXXX") != intDay) {
  //Update version2XXXX
  versionNumber[1] = (m.eGetI("version2XXXX") + 1);
}

  versionNumber[0] = atoi(filePtr[11]);
  strcpy(cVersion, versionNumber[0]);
  strcat(cVersion, ".");
  strcat(cVersion, versionNumber[1]);
  strcat(cVersion, ".");
  strcat(cVersion, versionNumber[2]);
  strcat(cVersion, "\0"); //Null-term

  return cVersion;
}
int dateExtract(const char versionDate) {
  int intYear;
  int intMonth;
  int intDay;
  char *cYear;
  int c = 10;
  cYear = &c;

  char *dateSscanFormats[5];
  int d = 10;
  dateSscanFormats = &d;

  char *dateSscanFormatShort[5];
  int d = 10;
  dateSscanFormatShort = &d;

  int x[6];
  int iHigh;
  String strGoto;

  x[0] = sscanf(versionDate, "%s %d, %d", strMonth, &intDay, &intYear);
  x[1]  = sscanf(versionDate, "%d/%d/%d", &intMonth, &intDay, &intYear);
  x[2] = sscanf(versionDate, "%d-%d-%d", &intMonth, &intDay, &intYear);
  x[3] = sscanf(versionDate, " % *s, % s % d, % d", strMonth, &intDay, &intYear);
  x[4] = sscanf(versionDate, "%d %d %d", &intMonth, &intDay, &intYear);
  for (int i = 0; i < 5; i++) {
    if (x[i] > x[5]) {
      x[5] = x[i];
      iHigh = i;
    }
    //get intMonth
    for (int i = 0; i < 13; i++) {
      if ((strMonth == strMonths[i]) || (strMonth == strMonthsLong[i])) {
        intMonths = i + 1;
      }
    }
    int intDate[4];
    intDate[0] = intMonth;
    intDate[1] = intDay;
    intDate[2] = intYear;
    return intDate;
  }
}

Here is .h file (truncated so it’ll fit).

#define EADDR_SZ 30
#define FUNCTION_COUNT 30
#define SPLIT_EMAILS_MAX 5
#define SMS_MAX_SIZE 160
#define SMTP_ENCODED_PASS U0cuSGpMQkZvTEVUS0N5czdHUGJzeUUwdy5xdFF3RHQxXzZfcWNxemtiWVhmc0F5Qnk3dG1iSlpFcTlVVnQ1Y3FiNHZF
#define SMTP_ENCODED_USERID YXBpa2V5
#define SMTP_SERVER smtp.sendgrid.net
#define TIMEOUT 5000
#define UDP_TIMEOUT 800
#define XXXX b

#ifndef MYHEADER 
#define MYHEADER

//#include "Arduino.h"



class my {
private:
void		EEPROMWriteInt(int p_address, int p_value);
void		EEPROMReadInt(int p_address);
void		EEPROMWritelong(int address, long value);
void 		EEPROMReadlong(int address);

String                  intDay[8] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
String                  intMonth[13] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
[TRUNCATED]                                                                   
		
	public:
			my(){};
			int 		udpRead();
			int 		sendUDP(char* udpDataOut, int node);
	String			subject =				"Default_subject";
[TRUNCATED]
			char 			*eGetC(String item);
			String			eGetS(String item);
			int				ePutI(String item, int dataIn);
			int				ePutL(String item, long dataIn);
			int				ePutC(String item, char *dataIn);
			int				ePut(String item, String dataIn);
			int				eAddr(String item);
			void 			charList(char *input);
			
			void 			debugOut(char *item, String dataIn);
			void			debugOut(char *item, char *dataIn)
			void 			debugOut(char *item, int dataIn);
			
			void			cp(int input);
			void			cp(char *input);
			void			cp(String input);
			
			void 			timeInit();
			void			timeGet();
		
			int				emailVolume(int intEmail);
			int				emailFloodControl();
			int				sendEmail(String to, String subject, String body); //Fills out smtpTo from alias, calls sendEmail2() n times with split body
	
		};

Here is bit of my .cpp

#define XXXX b //Version number 

#ifndef my_h
#define my_h

#include <EEPROM.h>
#include <string>

#include <NTPClient.h>
#include <Time.h>
#include <TimeLib.h>

#include <WString.h>
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <WiFiClient.h>
#include "my.h"

int yearI, monthI, weekDayI, daysI, hourI, minuteI, secondI;
int debugOn = 1;

char *item;
char *function;
char *functions[32];
long functionMS[32];
int functionLines[32];
char packetBuffer[32];

int my::functionCount(char *function, int line) {
  int f = 10;

mattlogue: Here is part of the sketch.. it's too big to include in-line.

Here is .h file (truncated so it'll fit).

Here is bit of my .cpp

You [u]REALLY[/u] need to learn how to make an MCVE. That's the smallest, complete code that actually demonstrates the error in question. If it's an run-time error, it should compile and produce that error (and only that error). If it's a compile-time error, it should display that error (and only that error) when someone copies it into the IDE and tries to verify.

So you wrote a program consisting of three compilation modules, where each one is too large to display here, and you just now discovered that your class members can't be recognized? And you don't bother to say what the error message is? If you have been testing all along, what is the last thing you changed?

#ifndef my_h
#define my_h

Include guards have NO place in source files.

  String lastIssue = m.m.eGetS("lastIssue");

m.m?

...
#include "my.h"

...
my m;
...

char *versionNumber() {
   ...
  int m = 10;
  ...
  filePtr = &m;
  ...
  if (m.eGetI("lastVersionDayXXXX") != intDay) {
    ...
  }
 ...
  return cVersion;
}

What is wrong with the above (with all the extraneous code removed).
Regards,
Ray L.

What is wrong with the above (with all the extraneous code removed).

Did you misspell right?

PaulS: Did you misspell right?

Do you completely miss the point? Let me simplify further, just for you:

 int m = 10;
  ...
  if (m.eGetI("lastVersionDayXXXX") != intDay) {

Do YOU believe it is valid to try to invoke the "eGetI" method of an int variable?? Perhaps you're using a different of c++ language than the one the rest of us are using... Regards, Ray L.

You missed @PaulS's [sarcasm], [/sarcasm] tags.

gfvalvo: You missed @PaulS's [sarcasm], [/sarcasm] tags.

Is that feature? I couldn't find the icon for it in the post editor.

Damn my short attention span, I re-declared m.