ACCESSING OBJECTS FROM MULTI .INO FILES

I have long program that I would like to split in to multiple .INO files. It works fine in one piece but when I transfer some part of the code into a different tab I get errors as in the attached images.

What is the issue?

Well, my issue is that I can’t see the error messages or the code.

Looking at the two attached screenshots tells us very Little to be able to help you. The scroll bar for Errors Shows that there are several. You only Show two. Both apply to enrolling.ino (line 63 and 80).

What we don't see is how FINGERPRINT_IMAGEFAIL or FINGERPRINT_OK are defined. You may simply have a Problem with capitalization or something.

Without being able to see the entire error/warning list and without seeing the rest of the code any "help" I can provide falls into the category of "pure speculation".

There I have attached the whole code, Kindly Check

Enrolling.ino (4.87 KB)

IOpins.h (229 Bytes)

SeatActivation.ino (303 Bytes)

Values.h (6 Bytes)

Can't see either the code or the error messages.
I guess you don't want help

When you encounter an error you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar).

I have attached a file bearing the copied error log

ERROR_LOG.txt (9.34 KB)

When you have multiple .ino files in a sketch the Arduino IDE concatenates them before compiling starting with the file that matches the sketch folder name (Enrolling.ino in your case), then the rest of the .ino files in alphabetical order. Since you moved your include of Adafruit_Fingerprint.h the declarations required by your code in Enrolling.ino were not present before they were needed. If you rearrange your code the errors should go away.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom... :slight_smile:

PERT, It worked THANKS, thanks Tom, I joined today your advice is highly welcome.Thanks to all

To enlarge upon the advice in Reply #7 ...

When the IDE loads the files in alphabetical order the code in file 'B' can access the variables in file 'A' but the code in 'A' cannot access the variables in 'B'.

...R