Integrating new h/w...
 
Notifications
Clear all

Integrating new h/w and s/w into someone else's large Arduino C /C++ project

12 Posts
3 Users
10 Likes
606 Views
(@jims123)
Member
Joined: 2 years ago
Posts: 35
Topic starter  

Bill,

Your YT Videos and tutorials are great, you have a real talent for organizing them and presenting them graphically, and logically to they're simple and easy to follow.

However, Many with limited programming experience often get in trouble when we try to add or change almost ANYTHING in someone else's Open Source software if it's a mid or larger sized project broken into lots of smaller macros and libraries to save code space as it's ported to different boards etc..  

The Arduino IDE Reference material and glossary are severely lacking in this area, It does not even mention many of the pre-compiler directives and macros, or library management issues that keep stabbing me in the back. 

I'm sure You could help us a lot with a video that explains how to make sure the pre-compiler can find all it needs to be able to compile a complex system of code BEFORE you make any change at all to it, or break it.. It must compile without errors initially before you mod anything.. How does one figure out where the problem lies when you "Think" you have all the referenced library's set up, yet it won't compile. 

Can you please consider doing a video on this topic.   


   
Quote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2528
 

@jims123

That's not really a viable task. You can't expect someone to give you a roadmap to a clean compile starting from any randomly selected sketch.

Imagine the effort required to explain how to untangle a sketch that was written by someone who did manage to Frankenstein some code copied and pasted from a dozen different sources and just managed to get lucky by accidentally having all of the required libraries on hand.

In other words, there's no substitute for experience, reading the error messages and Googling them for clues. Either that or stick to the jigsaw puzzle interlocking command sets and live with their limitations.

Anything seems possible when you don't know what you're talking about.


   
Inst-Tech and Ron reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 
Posted by: @jims123

Bill,

Your YT Videos and tutorials are great, you have a real talent for organizing them and presenting them graphically, and logically to they're simple and easy to follow.

However, Many with limited programming experience often get in trouble when we try to add or change almost ANYTHING in someone else's Open Source software if it's a mid or larger sized project broken into lots of smaller macros and libraries to save code space as it's ported to different boards etc..  

The Arduino IDE Reference material and glossary are severely lacking in this area, It does not even mention many of the pre-compiler directives and macros, or library management issues that keep stabbing me in the back. 

I'm sure You could help us a lot with a video that explains how to make sure the pre-compiler can find all it needs to be able to compile a complex system of code BEFORE you make any change at all to it, or break it.. It must compile without errors initially before you mod anything.. How does one figure out where the problem lies when you "Think" you have all the referenced library's set up, yet it won't compile. 

Can you please consider doing a video on this topic.   

Actually there is a great deal of documentation in the Arduino site. I recently discovered a new section the other day that added to my education.

As far as a video like what you are asking, that is a tall task. When I worked at IBM they determined that of the two methods of teaching the teach the theory method was the best. The other theory wqs to use a fault flow chart. They found that when a person trained only in the fault chart encountered an error not on the chart they were lost. A ridiculous example is the plug out of the wall. In other words, study the language, this means among other things memorizing what all the pre-processor statements do. Then learn about the data types, syntax, how to find libraries to help minimize the amount of code you need to write, and usually last but I think should be first is best practices and style. They say it takes 10,000 hours of study/practice to master a subject, so don't be discouraged you are not getting it after a few hours. Above all have fun.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

I did a quick search and found the following information

https://www.geeksforgeeks.org/cc-preprocessors/

https://www.cplusplus.com/doc/tutorial/preprocessor/

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
(@jims123)
Member
Joined: 2 years ago
Posts: 35
Topic starter  

Will, 

Surely there are are some generic and useful things a user could do to facilitate this process.. you've mentioned a few your self. 

With all due respect.. I think you'll agree experience alone hasn't solved all of humanity's problems nor will it.  We learn to stand on the shoulders of others and their work. YouTube is excellent in doing this and FULL of useful How-To info for inexperienced users.  Open Source is founded on the concept of providing re-useable code regardless of it's complexity.. its how science and technology advances.. leverage other's work and save time re-inventing the wheel by adopting what works.  

   Personally I've been googling error messages and trying to reach the vendor's support lines for several days now with very limited success.. the code category I'm referring to is complex but absolutely not Frankenstiein-ed together.  nor would I expect Bill to base a Guideline video on this Topic on the kind of code I'd write either..There are many great samples Elegoo.com has a lot of it for example. 

I'm getting nowhere sorting out why my IDE config can't find the referenced libraries that appear to me to have been correctly installed.. I'm pretty sure this is not an unusual problem ... But as to "experience" alone solving it.. I don't have that much time left  on earth.. I'll go back to Goggling it but its getting increasingly frustrating.. 

Thanks for your comments tho..  


   
ReplyQuote
(@jims123)
Member
Joined: 2 years ago
Posts: 35
Topic starter  

@zander Thanks Ron I'll check these out.. 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@jims123 "Vendor's support line" ??? Compiler error messages are not their responsibility. Most of them tell you exactly what is wrong but not all for sure. If all I get from an error msg is the line # (and offset) I can usually see the error.

Think about the problem in front of you as learning a foreign language. How would you go about that. Remember, these are programming languages so that is a very real comparison.

I have been writing code for over 50 years and have worked in a dozen languages or so plus can read with high comprehension hundreds more. How did I do that? By studying and practicing for many years. When I was in the position of hiring, I would not even look at the resume of anyone with less than 10 years experience but my systems were globally critical so the standard was very high. I telll ypou this ony to emphasize there is no short cut or replacement to years of experience. Learning syntax is just the beginning, but start there and that includes the preprocessor directives.

We have had a spate of new members with 'library' problems. ALL of them have been caused by user error in that they were trying to manually install things that are normally done via automatic mechanisms in the IDE. Perhaps some specific examples of what errors you see will help you to make progress.

@will is very good at troubleshooting, and I can also provide some less experienced (so far) insights as I am new to the Arduino world.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@jims123 Start at the web site arduino.cc I just checked it out and found the section on the IDE's 1.0 and 2.0 

https://docs.arduino.cc/learn/starting-guide/the-arduino-software-ide

and also the section on libraries

https://docs.arduino.cc/learn/starting-guide/software-libraries

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2528
 
Posted by: @jims123

Will, 

Surely there are are some generic and useful things a user could do to facilitate this process.. you've mentioned a few your self. 

Of course, common sense still applies.

With all due respect.. I think you'll agree experience alone hasn't solved all of humanity's problems nor will it.  We learn to stand on the shoulders of others and their work.

Agreed, but if you aren't just blindly aping somebody else's project, then surely you should be expected to have to dig into the problems you encounter while following your own path. I may have misinterpreted your post, it seemed to me that you were asking Bill to provide a one-shot solution to everybody's problems with #include libraries.

YouTube is excellent in doing this and FULL of useful How-To info for inexperienced users.  Open Source is founded on the concept of providing re-useable code regardless of it's complexity.. its how science and technology advances.. leverage other's work and save time re-inventing the wheel by adopting what works.  

Yes, and there's a whole process of learning associated with it, you have to learn how to mimic somebody else's world before you can improve on it. Take math, physics or chemistry as examples. You have to work your way up the learning ladder to expand anything in those fields. Same thing applies to electronics and programming. You can't just take somebody else's LED flashing sketch and add a stepper motor to it without understanding how to drive and program for the stepper motor.

   Personally I've been googling error messages and trying to reach the vendor's support lines for several days now with very limited success.. the code category I'm referring to is complex but absolutely not Frankenstiein-ed together.  nor would I expect Bill to base a Guideline video on this Topic on the kind of code I'd write either..There are many great samples Elegoo.com has a lot of it for example. 

Have you posted the errors and the sketch here ? There is a lot of expertise in programming and electronics available here to try and find your problems and explain the solution

I'm getting nowhere sorting out why my IDE config can't find the referenced libraries that appear to me to have been correctly installed.. I'm pretty sure this is not an unusual problem ... But as to "experience" alone solving it.. I don't have that much time left  on earth.. I'll go back to Goggling it but its getting increasingly frustrating.. 

I understand your frustration, I've been there myself, as has everyone else here. If you haven't made a mistake, you probably haven't ever made anything. In fact, I often think I learn more from MAKING mistakes than I do from getting it right the first time. When I make a mistake I have to go back over everything to learn why it failed and that helps me to learn what I have to do to make it work (and helps clarify HOW it works too, usually).

So don't give up ! It'll come to you 🙂

Anything seems possible when you don't know what you're talking about.


   
Inst-Tech and Ron reacted
ReplyQuote
(@jims123)
Member
Joined: 2 years ago
Posts: 35
Topic starter  

@zander Ron, I know you and Will are just trying to help but I would rather not pursue my current and unique issues within this in this "Suggest New Content" thread.. I'll keep reviewing at the links you've sent. The ones in the IDE I've read but I'll re-read them too..  My hope is that Bill consider doing a generic video on what to do when you encounter typical s/w and h/w integration issues with various types of pre-processor errors in the context of having already set up the IDE Boards Manager and Contributed Library Fodders and files per the guidance given by vendors. 

I think a lot of us would appreciate such a Pre-Compiler fault isolation guide. 

Let me hear what Elegoo Support has to say in reply to the specific details I sent by e-mail on of my unique problem then I will Post a plea for help in the Arduino section and ask for help if we can't solve it.  Part of my concern is my Malwarebytes is saying this site is suspicious.. and I'd like to know for sure that their guidance and code isn't compromised before I proceed..     

By The way.. I just read Will's reply ( above) and I do appreciate it.. but think it important to mention that in this case with an Egegoo.com V4 Robot and and the prior with a makebock.com mBot Mega robot .. I have NOT added any code at all, no would I until I get past this hurdle.... I am simply trying to get their stuff to compile as-is.. and establish a baseline using what ever they gave me for source and guidance on how to set up my IDE Libary and Board Manager to compile it.   

This post was modified 2 years ago by Jims123

   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@jims123 Ok, but posting the error and the specified line plus maybe 5 or 6 either side of the specified line would get you an answer within minutes here whereas the 'vendor' will not likely help for a bunch of reasons. Maybe just start a new thread in Help Wanted, start with the first compiler error and the line in error +- 5 or 6 more. Good luck.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
(@jims123)
Member
Joined: 2 years ago
Posts: 35
Topic starter  

@zander Ok U asked for it :).. I'll see you over in the Arduino thread.. give me a couple m,ins to read my e-mail and then I'll send the details. Thanks again.. 


   
Inst-Tech reacted
ReplyQuote