Arduino Tutorial - How the code structure works
Re: Arduino Tutorial - How the code structure works
Essentially. Those files are considered the "Libraries"
Re: Arduino Tutorial - How the code structure works
The #include statements essentially add standard code for doing stuff into your sketch (libraries, as Lee said). Instead of having to put a bunch of code into every single sketch to handle temperature sensors, we just #include a standard file that does it. It makes the sketch tidier and much easier to read and deal with.wolffman64 wrote:Hi Colin,
Thanks for the great write up, now I understand the basic part of it.
One question I have is regarding the first "include" part. I assume that those are the files that are unique for the RA, and defines how they are all wired into the arduino board etc, and what kind of input/output/variables you get from each function. Are they described in any more detail anywhere, for instance the "tempsensor" file, what is coming out of it etc, or have I completely misunderstood this?
The libraries are generally located at c:\Users\xxxxxx\Documents\Arduino\libraries, where xxxxxx is your user name. You can view them with any standard text editor (like notepad). There are .h files and .cpp files. The .cpp files are a little more interesting to look at and make more sense to the lay person.
Here is a good reference as well:
http://www.easte.net/RA/html/index.html
Hope this helps!
--Colin
-
- Posts: 62
- Joined: Mon Feb 24, 2014 9:38 pm
- Location: Sydney, Australia
Re: Arduino Tutorial - How the code structure works
Thanks Colin, appreciate your help!
Re: Arduino Tutorial - How the code structure works
You're welcome!
Re: Arduino Tutorial - How the code structure works
Very Helpful, thanks a lot
Re: Arduino Tutorial - How the code structure works
Thanks so much, this is fantastic. I am having a ball studying this "tutorial".
Question: looking at the library on my c drive, I see the many of the folders have a CPP file and an H file. Are these interchangeable? Why the different files?
Just the beginning of learning this stuff, but what a great start.
Question: looking at the library on my c drive, I see the many of the folders have a CPP file and an H file. Are these interchangeable? Why the different files?
Just the beginning of learning this stuff, but what a great start.
Re: Arduino Tutorial - How the code structure works
Thanks Roberto!!!!
Re: Arduino Tutorial - How the code structure works
Thank you for this tutorial! It has helped me to understand tremendously...since I am a absolute newbie to programming.
Re: Arduino Tutorial - How the code structure works
Glad it helped!
--Colin
--Colin