Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Arduino Programs Separate to Merge

Status
Not open for further replies.

imranahmed

Advanced Member level 3
Advanced Member level 3
Joined
Dec 4, 2011
Messages
817
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,493
Please let me know a person send me a Arduino Mega program or adding some methods but his program is separated means every module has separate sketch setup in one setup.ino and loop in other loop.ino and RTC.ino but how to merge them or how to compile them or will I need to add in single Arduino sketch.
Please see attachment.
 

Attachments

  • Sketches.png
    Sketches.png
    19.2 KB · Views: 104

Its common to use various example programs to create a design, thats what it
seems like your author has done. So "normally" one cuts and pastes the various
examples into one program. Your author seems to have thrown a lot of stuff
together looking for someone to do the "integration". Its tedious but not rocket
science.

Note author should have also supplied a system description for this to be done
properly.

Generally one takes root program and one at a time integrate then test/debug to get
a workable solution. Good luck....:)


Regards, Dana.
 
Its common to use various example programs to create a design, thats what it
seems like your author has done. So "normally" one cuts and pastes the various
examples into one program. Your author seems to have thrown a lot of stuff
together looking for someone to do the "integration". Its tedious but not rocket
science.

Note author should have also supplied a system description for this to be done
properly.

I generally take root program and one at a time integrate then test/debug to get
a workable solution. Good luck....:)


Regards, Dana.
Very Nice I understand now I will merge all sketches in a single sketch with sequence.
Thank you very much Dana.
 

Normally the main program.ino file will automatically include them if they are in the same folder.
The tedious method if they haven't is to open the main file, click in the top right corner to add a tab then copy the code into that tab.

Brian.
 

`The advantage of single file is easily removing duplicate resources / code used.
And duplicate symbol error elimination, which the compiler / linker will complain
about. And depending on compiler capability code optimization issues ? I will let
Arduino experts comment on that.....

Note you can still organize into multiple files, c files for example, to logically group
tasks, areas of focus, to keep main.c from becoming bloated, that is useful
programming practice and readability, just as you do when creating f()'s and
macros.

Still can be tedious work....:)

A more effective IDE is https://www.visualmicro.com/, there is a learning curve but
is a more capable IDE than the Arduino IDE. As reported debugging much better.


Regards, Dana.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top