Programming I

.

Language reference

http://arduino.cc/en/Reference/HomePage

http://arduino.cc/en/Tutorial/HomePage

.

.

Examples Code

http://wiring.org.co/learning/basics/index.html           <-  <-  <-  <-  <-  <-  <-  The Best

http://multilogica-shop.com/Aprendendo

http://www.dave-auld.net

.

.

First Example Code

Procedures is a list of things to do.
The Arduino program code must have the two following functions :
– void setup().
– void loop().
When the Arduino first wakes up after being reset, it always does whats in the setup function first,
Then it does whatever is in the loop function over and over and over…forever! Or at least until you turn it off.

Arduino_Blink

.

.

Libraries

A library is a big collection of functions.

To use a library in a sketch,  select it from Sketch > Import Library.

Not all libraries are available in this way, you can find more at

http://arduino.cc/en/Reference/Libraries

ARduino_Libraries

.

Example : the two lines of code ( picture below ) will be added if you select to import library “Firmata” ( above picture ).

ARduino_libraries2

.

.

Serial Library

http://arduino.cc/en/Reference/serial

In Serial Library you can find some functions like :
Begin()
Read()
Flush()
Print()
Printl()
Available()
etc…

In the next line code, there is a library function call. The library is called Serial and inside the library there is a Class called begin.

Arduino_Serial

Example

Arduino_Seriall

The print procedure is just like println except it does not print out a “carriage return” at the end, starting a new line.

.

.

.

.

.

.

Leave a comment