Visual examples

Hello,

I am new to Arduino, I have a base knowledge of electricity and a little more experience programing. Currently I am working through the "Begining Arduino" book. (Cant remember the name but its the blue one.) As I am working through the examples I find my self having trouble with aspects of the code. I tend to learn a little better visually, and I was wondering if anyone out there new of a good reference sheet or similar item, that can lay out the basics of the code structure with main functoning statements that are most commonly used?

I am trying to take the code from past exercises and add it to the code for the next exercise etc. I am not having success, and getting errors where there (as I understand it) should not be. More specifically, I am aware that at the end of a code you need to end it with an "}". Anyway, it would be great to get some advice on where to find such a reference item. The book doesn't have the example I thought that maybe someone else may have found. I think I will be better off for what I hope to gain from Arduino, if I get a really firm grasp on the code early on. Thanks for taking the time to look at my post.

The Arudino is programmed in C/C++. A comment like "code ends in a }" suggests you need to spend some time understanding C.

You can always post code here for suggestions on how to make it compile, but please wrap that code in [ code] tags.

A very sketchy reference off the top of my head:

Function:
( )
Block:
{ }
Statements:
;

if ( )
if ( ) else
while ( )
do while ( ) ;
for ( ; ; )
goto ;
continue ;
break ;
return ;

For a more complete/formal breakdown, pick up a copy of The C Programming Language 2nd Ed by Kernighan & Ritchie or download a copy of n1256.pdf

Great! Thanks for your reply's, this is a great starting point for me.

Hi,

I think this is a nice reference to have around, its the guide that oomlout supply with thier Arduino kits -

http://oomlout.com/products/ARDX/ARDX-experimenters-guide-WEB.pdf

Duane B

rcarduino.blogspot.com