| 1. |
What Does The Ide Change In My Sketch? |
|
Answer» The IDE makes subtle changes to the CODE when you compile your sketch. The changes are not permenant as a copy of your sketch is used to do the compiling. This is a consequence of the IDE allowing you to compile the sketch without saving into a file, which is what the compiler requires. In a breif rundown, the IDE does three MAJOR activities.
This has been a source of error for many new Arduino users attemping to write their own libraries. As confusing as it sounds, any library included into other libraries must also be included in the sketch; simply so it can be copied to the temporary location. To show a quick example of what the MODIFICATIONS look like; here is the BareMinimum sketch, and its modified result.
The modifications performed are great for beginners that do not know the C++ fundamentals required for building SIMPLE sketchs. The sketch looks tidier to the novice with only a setup()/loop() implementation cluttering up the workspace. However once you start using certain C++ features you can run into some common pitfalls as a result of these modifications. The IDE makes subtle changes to the code when you compile your sketch. The changes are not permenant as a copy of your sketch is used to do the compiling. This is a consequence of the IDE allowing you to compile the sketch without saving into a file, which is what the compiler requires. In a breif rundown, the IDE does three major activities. This has been a source of error for many new Arduino users attemping to write their own libraries. As confusing as it sounds, any library included into other libraries must also be included in the sketch; simply so it can be copied to the temporary location. To show a quick example of what the modifications look like; here is the BareMinimum sketch, and its modified result. The modifications performed are great for beginners that do not know the C++ fundamentals required for building simple sketchs. The sketch looks tidier to the novice with only a setup()/loop() implementation cluttering up the workspace. However once you start using certain C++ features you can run into some common pitfalls as a result of these modifications. |
|