Friday, July 29, 2011

Getting Started with Arduino (OS Ubuntu)

I was excited and impatient to see Arduino to work, so I immediately began to prepare the development environment on my Ubuntu machine and with a small example I gave birth to my first project with Arduino.
In this tutorial I will show you how to get ready the Arduino IDE on Ubuntu OS and an easy example of how to use it.


Installing Arduino on Ubuntu is very easy and fast, with a few steps you will have the development environment through which you can spread out your creativity handling projects based on Arduino.


You must install:

  • OpenJDK Java 6 Runtime – (Java Runtime Environment)
  • avr-libc
  • gcc-avr
  • Open-source Arduino enviroment

You can use the Ubuntu Software Center to install the OpenJDK:

OpenJDK Java 6


We install avr-libc and gcc-avr packages using the package manager:

avr-libc package



gcc-avr package


Now we have to download the development environment, go to the download area of Arduino site and download your specific version (Linux 32 or 64 bit):


Download page

After you downloaded the file, unzip it and keep the files in a folder.

WOW !! We have already finished !!

Yes, because - unlike Windows and Mac OS - since the version 2.6.31, the linux kernel includes drivers for Arduino !

For launching the Arduino development environment, do double click on the file named Arduino, included into the folder where unzipped files are. 
For more information about Arduino development environment, please refer to this link : Arduino Development Environment.

Arduino Development Environment


Our first project (very simple) 


Steps:

  • Start Arduino development environment
  • Click on File -> Examples -> Basic -> Blink
  • Click Tools -> Board and select your specific board
  • Click Tools -> Serial Port -> /dev/ttyACM1
  • Upload this example code


This example code turns on for one second, then off for one second, the Led on pin 13.


When the upload is finished, your Led starts blinking. 


AMAZING !!!


Blink Example Code







2 comments :