Arduino Tutorials

Using and Programming Arduino and other microcontrollers
PostsCOLON 2
JoinedCOLON Fri Apr 20, 2012 2:49 am

Arduino Tutorials

Postby Crashnburn » Thu Sep 13, 2012 2:58 pm

This lesson wont teach you anything about electronics. Just checking that everything works.

What you need:
An Arduino microcontroller board.
Connection cable(usually a USB A-B cable, but sometimes an FTDI cable).

Linux 32-bit 64-bit
Mac OS

Let's start:
Connect the Arduino to your pc with the connection cable.
You should get a small green light on your Arduino.
If you don't get the green light check that:
The connection cable is plugged into the computer and into the Arduino.
The computer is on:P
Try another USB port and/or connection cable.
Last edited by 2 on Crashnburn, edited 0 times in total.
Forum Administrator

PostsCOLON 2
JoinedCOLON Fri Apr 20, 2012 2:49 am

Lesson 2

Postby Crashnburn » Thu Sep 13, 2012 3:00 pm

Now its time to make the Arduino do something. We're going to start with the "Hello world!" of electronics, a blinking light.

What you need:
An Arduino board(preferrably an UNO).
Connection cable(If you are using the UNO this is an USB A-B Cable).
A LED, any LED will do.

Lets begin:
Insert the LED with the longest leg in the hole marked "13" and the shortest to ground(GND).
Start the Arduino program, go to "tools" then "board" and choose the Arduino board you are using.
Open the "blink" sketch, to do this go to "file"-"examples"-"01.Basics" and then choose "blink".
The code should look like this:

CodeColon Select all

  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

Uploading to the Arduino
Now press "CTRL+U" to upload your scetch, wait untill you get "Done uploading" in the status bar.
If you get the error message

CodeColon Select all

avrdude: stk500_getsync(): not in sync: resp=0x00
it means your Arduino is not responding.
If you get this message, check the connection cable, the Serial Port and the Driver.
You should now have a LED that is blinking!
If not, send me a PM or leave a comment.
Forum Administrator

PostsCOLON 745
JoinedCOLON Sat Apr 17, 2010 11:25 am

Re: Arduino Tutorials

Postby phenoptix » Fri Oct 05, 2012 3:52 pm

Welcome to the forums Crashnburn! Great tutorial. Looking forward to seeing more of your work. With you and the Crusher on here I'm sure we're going to see a lot more content!

Return to

Who is online

Users browsing this forum: 1 and 0 guests