Sorry if this has come up before but, is there a manual for the programming language?
A long time ago, a very long time, I did a C+ language course so appreciate the structured approach to learning the program.
Trying out various projects does teach you a bit but it's fragmented.
This page contains a reference for the Arduino core library functions as well as some basic standard C++:
For general C++, I like this page: http://www.cplusplus.com/reference/
and their tutorial: http://www.cplusplus.com/doc/tutorial/
but I'm sure others have different favorites. For those two links and similar references you need to keep in mind that C++ on a microcontroller is not exactly the same as C++ on a computer due to the limitations of the hardware and outputs and so you do need to filter through the information that doesn't apply.
jomacot:
Sorry if this has come up before but, is there a manual for the programming language?
A long time ago, a very long time, I did a C+ language course so appreciate the structured approach to learning the program.
Trying out various projects does teach you a bit but it's fragmented.
They are called "books". Ask at your local book store, either new or used. Ask Ebay or Amazon for a list of Arduino programming books. Even old books on C or C++ will help you with the Arduino programming.
Thanks for all the replies, even the sarcastic one!
As it turns out I was programming in C not C++ but as I said that was over 20 years ago and I've not used anything like it since.
Books Manuals whatever what I was trying to ascertain was the type of program, it looked like C to me but then I'm no expert hence the question. So I was trying to find out if this was a cut down or enhanced version of a C language specifically for Arduino
jomacot:
So I was trying to find out if this was a cut down or enhanced version of a C language specifically for Arduino
so it is right now (circa) C++ '11... reshaped for Arduino micro-controller environment, meaning that you will come across some the Arduino IDE's peccadilloes from time to time.
jomacot:
As it turns out I was programming in C not C++ snip
The compiler is C++ and a lot of library stuff is in classes.
Your 'sketch' code is pre-processed to generate required headers and forward declarations then compiled with a pre-made main() to make it more 'plug-and-play'.
IMHO, sticking with C is fine for Arduino, I tend to avoid C++ constructs on tiny processors (dynamic memory allocation can be a bit fraught on a machine with only a couple of K of RAM).
The only real problem I've encountered from an old 'C' perspective was using "typedef struct _name{...}NAME;" where the compiler threw a wobbler. Stick to "struct NAME{...};".
The difficulty you may find is that most C++ books are written from the perspective of a large UNIX computer. Constructs like standard-out and error-out don't exist on the Arduino. Those aren't actually part of the language but part of the standard input-output library. The books don't usually get into the details of what is or isn't part of the language.
It's more confusing when you want information on a very common library like math.h which does exist in that book-world but since it isn't "part of the language" they don't explain any of it.
Start from "Arduino for Teens" or something like that. I hear that's a good one.