Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running Parallel ino Files?
04-03-2017, 10:05 PM
Post: #1
Running Parallel ino Files?
Hello

I have seen several Github folders and there are many projects, like B-Robot, that post multiple .ino files. My question is, does arduino run multiple .ino files in parallel (simultaneously) or do I have to compile the entire algorithm on one .ino file...

If it does, how do you associate the separate .ino files into the same application and how do you do that from the arduino IDE?

If you need a variable that's generated from one .ino file, how do you access in another .ino file. I have programmed object oriented before using C# and Unity. The way to access variables from another file was to declare global and create an instance inside the file that's trying to access the other class's functions or variables. Does arduino sketch allow for this type of access and how to combine files into the same project?

Thank you.
Find all posts by this user
Quote this message in a reply
04-05-2017, 09:31 AM
Post: #2
RE: Running Parallel ino Files?
You should see all the ino files opened at the same time in several tabs if you open , for example "BROBOT_EVO2_17.ino"
"As long as you are using .INO files it does not matter how you distribute your functions among the files and how they are ordered within them. This makes programming easier, which is the idea behind .INO files.

However, as your project becomes larger and more complex, you might experience certain limitations of the .INO approach, especially if you are starting to use certain elements common to the C++ language like typdefs or global variables. This will be the time when you should consider switching to .CPP and .H files."

more info here:
http://www.visualmicro.com/page/User-Gui...-CPPs.html
and here: http://arduino.stackexchange.com/questio...-same-name
Visit this user's website Find all posts by this user
Quote this message in a reply
04-05-2017, 10:36 PM
Post: #3
RE: Running Parallel ino Files?
Ok, I think I'm following what you're saying. But let's say you're running a parallel .ino file for MPU6050. Can you and, how can you, access variables in the MPU6050 .ino from inside another .ino file...

(04-05-2017 09:31 AM)jpedroc Wrote:  You should see all the ino files opened at the same time in several tabs if you open , for example "BROBOT_EVO2_17.ino"
"As long as you are using .INO files it does not matter how you distribute your functions among the files and how they are ordered within them. This makes programming easier, which is the idea behind .INO files.

However, as your project becomes larger and more complex, you might experience certain limitations of the .INO approach, especially if you are starting to use certain elements common to the C++ language like typdefs or global variables. This will be the time when you should consider switching to .CPP and .H files."

more info here:
http://www.visualmicro.com/page/User-Gui...-CPPs.html
and here: http://arduino.stackexchange.com/questio...-same-name
Find all posts by this user
Quote this message in a reply
04-06-2017, 07:26 AM
Post: #4
RE: Running Parallel ino Files?
(04-05-2017 10:36 PM)KyloRen Wrote:  Ok, I think I'm following what you're saying. But let's say you're running a parallel .ino file for MPU6050. Can you and, how can you, access variables in the MPU6050 .ino from inside another .ino file...
Reread the chapter:
How Visual Micro handles the files during compilation
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)