- Origin and History of Arduino
- Getting Acquainted with the IDE
- "Hello World" sketch
- Traffic Lights
Born in an Italian design school, the Arduino was always going to be beatuiful. The distinctive microcontroller has won admirers all over the world, not just for its good looks but in particular for its ease of programming. While the company name and brand are protected copyrights the hardware design and programming software are all open source, meaning that anyone with sufficient knowledge can adapt and modify either of these to their hearts content. Since 2009? the Uno and a wide variety clones/copycats/officailly supported derivatives have found their way into the hands of engineers and hobbyists alike, which has contributed to the recent explosion in the maker movement and internet-of-things devices.
Much of the Arduino's success is attributable to the open source nature of the project. It is possible to modify both the source code of the Arduino software as well as build your own Arduino in fact it's technically possible to build an imitation Arduino for under €5 worth of parts. This open philosophy has led to a huge community of users, hackers and makers springing up and supporting the platform, and it is arguably this community that is that Arduino's greatest asset.
An IDE, or __i__ntegrated __d__evelopment __e__nvironment, is used to write human readable software, compile it into machine readable code and produce illegible debug messages that will have you tearing your hair out in no time. The Arduino IDE is based on Processing, an open source project developed by ?, and is currently in version 1.6. The icons on the top of the editor perform the following functions: Verify and Upload: Verify simply checks that the code is syntactically correct and suitable for uploading. The upload button verifys the code and then uploads it to the connected board.
New, Open and Save as the the names imply are for creating new sketches, opening existing sketches and saving the current sketch.
On the top right of the editor is the Open Serial Monitor button. It allows you to send and recieve serial data between your computer and the Arduino.
A program in Arduino is referred to as a sketch, which is a nod to its design origins. Sketches have the filetype .ino
, as in ardu__ino__.
As we progress we'll develop more and more sophisticated programs, but let's start with the most basic "Hello World" sketch, blink, which simply turns on and off the on-baord LED.
There are two sections, or blocks, of code that every sketch has to have, the setup()
and the loop()
The loop function will just execute over and over again. In our example we are two different messages, or signals, to our LED. First we set it to be on (HIGH) and then off (LOW).
void loop(){
}
blinking
looping
int LED = 13;
Voltage and current from an Arduino pin