Operácie

Acrob001: Rozdiel medzi revíziami

Z SensorWiki

(Nová stránka: == 1. Úloha == Spustite vývojové prostredie kliknutím na ikonu Obrázok:ArduinoIcon.png. Najprv spravte základné nastavenia - t.j. typ riadiacej jednotky s ktorou budeme ...)
 
 
(2 medziľahlé úpravy od rovnakého používateľa nie sú zobrazené.)
Riadok 1: Riadok 1:
== 1. Úloha ==
+
___NOTOC___
 +
== '''Before You start''' ==
  
 +
=== Download ===
  
Spustite vývojové prostredie kliknutím na ikonu [[Obrázok:ArduinoIcon.png]]. Najprv spravte základné nastavenia - t.j. typ riadiacej
+
Just download the latest version of the Arduino IDE from the http://arduino.cc
jednotky s ktorou budeme pracovať:
 
  
[[Obrázok:ArduinoBoardSetting01.png|center]]
 
  
a sériový port, cez ktorý budeme s jednotkou komunikovať a nahrávať do nej programy cez tzv. ''bootloader''. Keďže používame prevodník
 
USB na sériovú linku, musíme predtým zistiť, aké číslo portu pridelil OS Win:
 
  
[[Obrázok:ArduinoPortSetting01.png|center]]
+
=== Install ===
Potom vložte nasledovný program:
+
 
 +
No install. Just unzip the installation package.
 +
 
 +
Then, FTDI USB driver may be neccesary to install. Plug in Your hardware and when Windows ask for driver, go to the Arduino
 +
/drivers directory. For some hardware configurations it may be necessary to change default configuration according this
 +
manual:  
 +
Go into the device manager (Windows 7) and highlight the FTDI device (a virtual COM port).
 +
Then went to Properties -> Port settings -> Advanced.
 +
Then check off the box "Set Rts on close".
  
<source lang="c">
+
=== Setup ===
void setup()
 
{
 
Serial.begin(9600);
 
}
 
  
void loop()
+
The Arduino integrated development environment (IDE) is run using the icon [[Obrázok:ArduinoIcon.png]] on Your desktop.  
{
 
Serial.println("Hello, World!");
 
}
 
</source>
 
  
Malo by to vyzerať takto:
+
First You have to perform the basic settings: the type of Your board and serial port to which is it connected.
  
[[Obrázok:ArduinoIDE01.png|center]]
 
  
Potom program skompilujte [[Obrázok:ArduinoButtonCompile.png|29px]], uložte [[Obrázok:ArduinoButtonSave.png|29px]]
+
Go to the menu and select Tools -> Board -> Arduino Diecimila, Duemilanove or Nano w/ Atmega168.
a nahrajte do riadiacej jednotky [[Obrázok:ArduinoButtonUpload.png|29px]]. Ak je nahratie úspešné, program sa spustí
+
This is the type of the board we will use.  
automaticky. Aby ste videli, ako funguje, otvorte si zabudovaný terminál [[Obrázok:ArduinoButtonTerminal.png|29px]].
 
  
Malo by to vyzerať takto:
+
[[Obrázok:ArduinoBoardSetting01.png|center]]
  
[[Obrázok:ArduinoIDE02.png|center]]
+
Then, again from the main menu select Tools -> Ports -> COMx where x is a number of Your serial port to which is the board connected.  
 +
This port is used for communication, sending and receiving messages and also for program download using special firmware ''bootloader''.
 +
We use the USB/Serial converter, so it is necessary to know, which number is given by the operating system Windows
  
Všimnite si, že program je rozdelený do dvoch blokov. Sekcia <TT>setup()</TT> sa spustí len
+
[[Obrázok:ArduinoPortSetting01.png|center]]
raz pri štarte programu. Obvykle sú tu nastavenia, definície a konfigurácia hardvéru.
 
Potom program pokračuje nekonečnou slučkou <TT>loop ()</TT>. Tu je definovaná základná činnosť
 
robota.
 
  
 +
You are ready for Your first programm!
  
[[Acrob|Späť do menu]] | [[Acrob02|Pokračovanie...]]
+
[[Acrob|Home]] | [[Acrob002|Next >]]

Aktuálna revízia z 08:40, 13. jún 2010

__

Before You start

Download

Just download the latest version of the Arduino IDE from the http://arduino.cc


Install

No install. Just unzip the installation package.

Then, FTDI USB driver may be neccesary to install. Plug in Your hardware and when Windows ask for driver, go to the Arduino /drivers directory. For some hardware configurations it may be necessary to change default configuration according this manual: Go into the device manager (Windows 7) and highlight the FTDI device (a virtual COM port). Then went to Properties -> Port settings -> Advanced. Then check off the box "Set Rts on close".

Setup

The Arduino integrated development environment (IDE) is run using the icon ArduinoIcon.png on Your desktop.

First You have to perform the basic settings: the type of Your board and serial port to which is it connected.


Go to the menu and select Tools -> Board -> Arduino Diecimila, Duemilanove or Nano w/ Atmega168. This is the type of the board we will use.

ArduinoBoardSetting01.png

Then, again from the main menu select Tools -> Ports -> COMx where x is a number of Your serial port to which is the board connected. This port is used for communication, sending and receiving messages and also for program download using special firmware bootloader. We use the USB/Serial converter, so it is necessary to know, which number is given by the operating system Windows

ArduinoPortSetting01.png

You are ready for Your first programm!

Home | Next >