Arduino Programming Questions

Read this before posting a programming question … 1. Arduino programming language The Arduino basically uses the industry-standard C++ language, implemented by the GNU g++ compiler. For information on basic things like loops, strings, functions, data types, and so on try consulting one of the many online C++ references. Hint: Google “C++ tutorial”. The main sketch is C++, however the IDE does do a certain amount of pre-processing (in particular, generating function prototypes for you) before submitting the code to the main C++ compiler (see point 12 below). 2. Version 1.0 of the IDE* A few things were changed in the 1.0 release version of the IDE. In particular some older examples and libraries may have this at the start: Code: [Select] #include "WProgram.h" If you get errors try locating such places and changing that line to: Code: [Select] #include "Arduino.h" * IDE = Integrated Development Environment 3. Libraries Many useful features are implemented by libraries. These are basically xxx.cpp and xxx.h files collected together into a library folder. Some come with the IDE. See here for how to add additional libraries: http://arduino.cc/it/Reference/Libraries (It is easy enough to write your own, they are basically just C++ source code). 4. Reference page Many functions specific to the…
[cminds_free_author id="cmfaq"]