Thursday, September 26, 2013

Second project (Advanced LED program)

    Well, today i will show you how to create advanced LED program!




    You need:
        1) Arduino board.
        2) Bread board.
        3) Wires.
        4) LED(s).
        5) Computer.
        6) Arduino compiler.
        7) USB cable to upload your code on arduino board.

    Well, let's start with schematics below. I've done it by myself, it will explain you how to connect all components together:
I marked wires with green color. And LED(s) with yellow. One very meaningful thing: LEDs have got short and long wires! You need to connect GND to the short one, and digital pin(s) to the long one!

   After you have connected all components you need to write a code, which your arduino board will execute. So, let's do it!

#define LED1 13 //LED connected to digital pin 13
//if you have more than one LED,
// you need to declare and initialize another variables
#define LED2 12 //LED connected to digital
#define LED3 11 //LED connected to digital pin 11

void setup() //setup function
{
pinMode(LED1, OUTPUT); //set the digital pin as output
       //for first LED
  
//if you have more than one LED,
        // you need to set another digital pins as output

pinMode(LED2, OUTPUT); //set the digital pin as output
       //for second LED
  
pinMode(LED3, OUTPUT); //set the digital pin as output
       //for third LED
}

void loop() //loop function
{
digitalWrite(LED1, HIGH); //turns our first LED on
delay(1000); //waits for a second

//if you have more than one LED,
//you need to write a code for another LED(s)

digitalWrite(LED1, LOW); //turns our first LED off
digitalWrite(LED2, HIGH); //turns our second LED on
delay(1000); //waits for a second

digitalWrite(LED2, LOW); //turns our second LED off
digitalWrite(LED3, HIGH); //turns our third LED on
delay(1000); //waits for a second

digitalWrite(LED3, LOW); //turns our third LED off

}


Well, now we need to upload our code and that's it! To do it you need to connect you arduino board to your computer and press upload button, which you can see on the screenshot below.

    If you have got some questions, don't be shy - write comments!

Tuesday, September 24, 2013

Alot of usefull information

    I have found alot of web sites and links with very usefull information. Full descriptions, meanings and symbols of all components, which we will use you can find here. I like this web site, because you can find alot of information. To find it you jast need to press on the component name label (Wikipedia page will open on a new tab). Example you can see on the screenshot below.

    Also i have found very good circuit simulator. Unfortunately it is not free, but you can try in online for free! And you can save your project on your account and then download it! To try it online you jast need to pess this button: 

    Now some information about wires. We have got two tipes of wires:
        With one metalic wire inside.
        With more than one metalic wires inside.

    On our last lesson to create a circuit we used first type of wires. My group and i made "SOS signal lamp".

    SCR(source code) of my programm i will publish later. =)

Wednesday, September 18, 2013

My first Arduino programm!

     It was very interesting to try to create a programm, because when you start to create something you can understand that you can code everything you want! I'm not very good at Arduino programming language yet, but i belive that one day i will code something very usefull and smart.

Some usefull information:

Source code of my first programm:

void setup()
{
    pinMode(13, OUTPUT); // set digital pin 13 to output
}

void loop()
{
    digitalWrite(13, HIGH); //turn light on
    delay(500) //wait 0.5 seconds
    digitalWrite(13, LOW); //turn light off
    delay(1000) //wait 1 second
}

Monday, September 16, 2013

My first lesson

      Firstly i want to say, that it was awesome! We made boxes for our instruments and main panel. Also we have downloaded program for creating operations for our future robots.

      On first lesson it was hard: 
  • To make free space in our boxes, because they were not empty.
  • Learn names of each instrument.
      And now the most interesting thing: it is our main panel. Later we will upgrade this thing more and more...