How to use variables and functions across multiple .ino files
When you compile multiple files in the Arduno IDE the files first get concatenated together.

It happens in alphabetical order, except the main INO file (the one named the same as the folder it's in) is placed first.

In C the order in which things appear in the file matters. Basically you have to make sure that things (like variables, functions, etc) are defined before they are used.

This gets more complex when you have a hidden thing like file concatenation messing things up.

The Arduino IDE tries to hide some of it from you too by making function prototypes, so it doesn't matter what order you define functions in - however that "helpfulness" means you don't learn about the proper structure of a C program.

So what can you do? Well, simply make sure that all your global variables are defined in the main file, unless you know they are only going to be used within the file they are defined in.