Arduino команды

This page is obsolete. You should instead see the Windows Howto or the Mac OS X howto (both in the Arduino guide).

These are the steps you need to follow in order to be up and running:

  1. Get an Arduino board
  2. Download the Arduino environment
  3. Install the USB drivers
  4. Connect the board
  5. Upload a program

1 | Get an Arduino board

The Arduino i/o board is a simple circuit featuring the ATmega8 processor from Atmel. The board is composed of a printed circuit board (PCB) and electronic parts.

There are a few ways to get an Arduino board:

  • buy a ready made board. See how you can buy a board or just the PCB.
  • purchase parts. purchase the parts from any electronics store. The Serial version in particular has been designed to use the most basic parts that can be found anywhere in the world. The USB version on the other hand requires some advanced soldering skills because of the FTDI chip that is an smd part. Here is a list of parts for the serial board.
  • assemble the board. We put together a step by step guide on how to build an arduino board. Newbies: never soldered before? afraid of trashing thousands of boards before getting one properly soldered? fear not 🙂 learn to master the art of soldering.
  • program the bootloader. In order for the development environment to be able to program the chip, this has to be programmed with a piece of code called bootloader. See the bootloader page on how to program it on your chip.

2 | Download the Arduino environment

To program the Arduino board you need the Arduino environment.

Download Arduino: From the software page.

Linux note: For help getting the Arduino IDE running on Debian, please see the FAQ ("How can I run the Arduino IDE under Linux?").

Mac OS X note: After downloading the IDE, run the macosx_setup.command . It corrects permission on a few files for use with the serial port and will prompt you for your password. You may need to reboot after running this script.

3 | Install the USB drivers

If you are using a USB Arduino, you will need to install the drivers for the FTDI chip on the board. These can be found in the drivers directory of the Arduino distribution.

On Windows, you will need to unzip FTDI USB Drivers.zip . Then, when you plug in the Arduino board, point the Windows Add Hardware wizard to the FTDI USB Drivers directory.

On the Mac, mount the FTDIUSBSerialDriver _v2_1_6.dmg (on PPC machines) or the FTDIUSBSerialDriver _v2_2_6_Intel.dmg (on Intel machines) disk image and run the included FTDIUSBSerialDriver .pkg .

The latest version of the drivers can be found on the FTDI website.

4 | Connect the board

If you’re using a serial board, power the board with an external power supply (6 to 25 volts DC, with the core of the connector positive). Connect the board to a serial port on your computer.

On the USB boards, the power source is selected by the jumper between the USB and power plugs. To power the board from the USB port (good for controlling low power devices like LEDs ), place the jumper on the two pins closest to the USB plug. To power the board from an external power supply (needed for motors and other high current devices), place the jumper on the two pins closest to the power plug. Either way, connect the board to a USB port on your computer. On Windows, the Add New Hardware wizard will open; tell it you want to specify the location to search for drivers and point to the folder containing the USB drivers you unzipped in the previous step.

The power LED should go on.

5 | Upload a program

Open the LED blink example sketch: File Sketchbook Examples led_blink.

Here’s what the code for the LED blink example looks like.

Select the serial device of the Arduino board from the Tools | Serial Port menu. On Windows, this should be COM1 or COM2 for a serial Arduino board, or COM3 , COM4 , or COM5 for a USB board. On the Mac, this should be something like /dev/cu.usbserial-1B1 for a USB board, or something like /dev/ cu.USA19QW1b1P1 .1 if using a Keyspan adapter with a serial board (other USB-to-serial adapters use different names).

Push the reset button on the board then click the Upload button in the IDE. Wait a few seconds. If successful, the message "Done uploading." will appear in the status bar.

If the Arduino board doesn’t show up in the Tools | Serial Port menu, or you get an error while uploading, please see the FAQ for troubleshooting suggestions.

A few seconds after the upload finishes, you should see the amber (yellow) LED on the board start to blink.


Источник: www.arduino.cc