Start from unboxing

  • This page contains how to setup the software environment to start playing with Arduino.
  • The example used will be the most commonly used model "Arduino UNO" in most popular starter's kits.
  • The same procedure also apply to most other Arduino Products.

Pre-requisite:

  1. Having a set up Arduino board on hand. (Can purchase through Spark fun)

Objectives:

  1. Setup the environment and see something happening

Descriptions:

  1. Several key elements you have to know on Arduino UNO (What is Type B USB connector):
  2. Download and Install Arduino IDE
    1. The official stable release is 1.0.5, which in most cases is the one you want to get.
    2. Download according to which system you are using(Windows, Mac, Linux).
    3. For windows specifically, you need to install the Arduino IDE before you plug the board onto your PC, for how windows handles device Drivers differently.
  3. Connect the Arduino UNO to your Desktop/Laptop via USB
    1. If you purchase an Arduino, it usually comes with the correct cable
    2. In case you've lost the cable or the cable doesn't work, what you need is a Type A to Type B USB cable.(What are these)
    3. The computer will recognize the device
      1. In windows its COM# (# being a number)
      2. in UNIX-like system it's USBTTY (Mac/Linux/Solaries/etc.)
  4. Start the Arduino IDE
    1. Should be something that looks like this:
       
    2. Select which interface you are using for the Arduino
      1. For Windows, it should be COM# (# stands for a number)
      2. For Unix-like system (usually Mac for design students) it should be /dev/tty.usbmodem##### (# stands for a number or a character)
    3. Select the Board-type
      1. In our case Arduino UNO
      2. Select the board according to the board you are using
    4. Go to File → Example and under 01.Basics → Blink
      1. Open the example sketch
         
      2. You will see a programme like this

        Example programme from Arduino Blink
        /*
          Blink
          Turns on an LED on for one second, then off for one second, repeatedly.
         
          This example code is in the public domain.
         */
         
        // Pin 13 has an LED connected on most Arduino boards.
        // give it a name:
        int led = 13;
        // the setup routine runs once when you press reset:
        void setup() {                
          // initialize the digital pin as an output.
          pinMode(led, OUTPUT);     
        }
        // the loop routine runs over and over again forever:
        void loop() {
          digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
          delay(1000);               // wait for a second
          digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
          delay(1000);               // wait for a second
        }
      3. Upload the programme to Arduino
      4. You should see the LED onboard blinking
         
      5. Try modify the "1000" in the delay function and see what happens with the blinking.

Appendix:

  • Types of USB connectors
  • No labels