[go: nahoru, domu]

Jump to content

Arduino

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by CUSENZA Mario (talk | contribs) at 22:50, 21 October 2009. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Arduino Software
Developer(s)Arduino Software
Stable release
0017 / August 12, 2009 (2009-08-12)
Written inJava
Operating systemCross-platform
TypeIntegrated Development Environment
LicenseLGPL or GPL license
Websitehttp://www.arduino.cc/en/

Arduino is a physical computing platform based on a simple open hardware design for a single-board microcontroller, with embedded I/O support and a standard programming language.[1] The Arduino programming language is based on Wiring and is essentially C/C++ (several simple transformations are performed before passing to avr-gcc).[2] The goal of the Arduino project is to make tools available that are accessible, low-cost, low capital investment, flexible and easy-to-use for artists and hobbyists. Particularly those who might not otherwise have access to more sophisticated controllers that require more complicated tools.[3]

Arduino can be used to develop stand-alone interactive objects or it can be connected to a host computer. A typical Arduino board carries the controller, some digital and analogue I/O lines, and a serial or USB interface to the host. This host is used for both programming the board, and run-time interaction with the Arduino. Arduinos themselves generally do not have networking facilities, but it is common to combine one or more Arduinos with a networked host, using the Arduino as hardware controllers and the host as a network or user interface. Host interfacing is simple, since the host software may be written in a variety of languages. A popular language is Processing, but other languages that can access the serial connection are Max/MSP, Pure Data or SuperCollider.[4]

Programming is usually carried out through the Arduino IDE,[5] based on the Processing project. Arduino's programming language itself[6] is based on Wiring and resembles C. Within the Arduino IDE, this is first cross-compiled through avr-gcc, then downloaded to the attached Arduino board. The IDE then acts as a serial terminal emulator, allowing interaction with the running Arduino.

Current Arduino hardware is based on the Atmel AVR microcontroller. This is not a formal requirement and could be extended if such hardware and tools supported the Arduino language and was accepted by the Arduino project.[1] Clones already exist that are Arduino-inspired or compatible with features of the Arduino such as its I/O expansion boards, although they are labelled under other names.

Currently shipping versions can be purchased pre-assembled; hardware design information is available for those who would like to assemble an Arduino by hand.

The Arduino project received an honorary mention in the Digital Communities category at the 2006 Prix Ars Electronica.[7][8]

The project began in Ivrea, Italy in 2005 to make a device for controlling student-built interaction design projects less expensively than other prototyping systems available at the time. More than 50,000 Arduino boards have shipped as of October 2008.[9]

Platform

Hardware

An Arduino board consists of an 8-bit Atmel AVR microcontroller with complementary components to facilitate programming and incorporation into other circuits. An important aspect of the Arduino is the standard way that connectors are exposed allowing the CPU board to be connected to a variety of interchangeable add-on modules (know as shields). Official Arduinos have used the megaAVR series of chips, specifically the ATmega8, ATmega168, ATmega328, and ATmega1280. A handful of other processors have been used by Arduino clones. Most boards include a 5-volt linear regulator and a 16MHz crystal oscillator (or ceramic resonator in some variants), although some designs such as the LilyPad run at 8Mhz and dispense with the onboard voltage regulator due to specific form-factor restrictions. An Arduino's microcontroller is also pre-programmed with a bootloader that simplifies uploading of programs to the on-chip flash memory, compared with other devices that typically need an external chip programmer.

At a conceptual level, all boards are programmed over an RS-232 serial connection, but the way this is implemented in hardware varies by version. Serial Arduino boards contain a simple inverter circuit to convert between RS-232-level and TTL-level signals. Current Arduino boards are programmed via USB, implemented using USB-to-serial adapter chips such as the FTDI FT232. Some variants, such as the Arduino Mini and the unofficial Boarduino, use a detachable USB-to-serial adapter board or cable, Bluetooth or other methods.

The Arduino board exposes most of the microcontroller's I/O pins for use by other circuits. The Diecimila, now superseded by the Duemilanove, for example, provides 14 digital I/O pins, 6 of which can produce PWM signals, and 6 analog inputs. These pins are available on the top of the board, via female 0.1 inch headers. Several plug-in application boards known as "shields" are also commercially available.

The Arduino Nano, and Arduino-compatible Barebones and Boarduino boards provide male header pins on the underside of the board to be plugged into solderless breadboards.

Software

The Arduino IDE is a cross-platform application written in Java which is derived from the IDE made for the Processing programming language and the Wiring project. It is designed to introduce programming to artists and other newcomers unfamiliar with software development. It includes a code editor with features such as syntax highlighting, brace matching, and automatic indentation, and is also capable of compiling and uploading programs to the board with a single click. There is typically no need to edit Makefiles or run programs on the command line.

The Arduino IDE comes with a C/C++ library called "Wiring" (from the project of the same name), which makes many common input/output operations much easier. Arduino programs are written in C/C++, although users only need to define two functions in order to make a runnable program:

  • setup() – a function run once at the start of a program which can be used to initialize settings, and
  • loop() – a function called repeatedly until the board is powered off.

A typical first program for a microcontroller is to simply blink a light-emitting diode on and off. In the Arduino environment, the user might write a program like this:

#define LED_PIN 13

void setup () {
    pinMode (LED_PIN, OUTPUT);     // enable pin 13 for digital output
}

void loop () {
    digitalWrite (LED_PIN, HIGH);  // turn on the LED
    delay (1000);                  // wait one second (1000 milliseconds)
    digitalWrite (LED_PIN, LOW);   // turn off the LED
    delay (1000);                  // wait one second
}

The above code would not be seen by the compiler as a valid program, so when the user clicks the "Upload to I/O board" button in the IDE, a copy of the code is written to a temporary file with an extra include header at the top and a very simple main() function at the bottom:

#include "WProgram.h"
#define LED_PIN 13

void setup () {
    pinMode (LED_PIN, OUTPUT);     // enable pin 13 for digital output
}

void loop () {
    digitalWrite (LED_PIN, HIGH);  // turn on the LED
    delay (1000);                  // wait one second (1000 milliseconds)
    digitalWrite (LED_PIN, LOW);   // turn off the LED
    delay (1000);                  // wait one second
}

int main(void)
{
    init();

    setup();
    
    for (;;)
        loop();
        
    return 0;
}

"WProgram.h" is the main header for the Wiring library, and the main() function only makes three distinct calls: init(), defined in the library itself, and the setup() and loop() functions defined by the user.

The Arduino IDE uses the GNU toolchain and AVR Libc to compile programs, and uses avrdude to upload programs to the board.

There is much more to say about the Sanguino and its applications in the RepRap Project.

Official hardware

The Arduino Diecimila

The original Arduino hardware is manufactured by the Italian company Smart Projects. Some Arduino-branded boards have been designed by the American company SparkFun Electronics.

Eleven versions of the Arduino hardware have been commercially produced to date:[10]

  1. The Serial Arduino, programmed with a DB9 serial connection and using an ATmega8
  2. The Arduino Extreme, with a USB interface for programming and using an ATmega8
  3. The Arduino Mini, a miniature version of the Arduino using a surface-mounted ATmega168
  4. The Arduino Nano, an even smaller, USB powered version of the Arduino using a surface-mounted ATmega168
  5. The LilyPad Arduino, a minimalist design for wearable application using a surface-mounted ATmega168
  6. The Arduino NG, with a USB interface for programming and using an ATmega8
  7. The Arduino NG plus, with a USB interface for programming and using an ATmega168
  8. The Arduino BT, with a Bluetooth interface for programming using an ATmega168
  9. The Arduino Diecimila, with a USB interface and utilizes an Atmega168 in a DIL28 package (pictured)
  10. The Arduino Duemilanove ("2009"), using the Atmega168 (Atmega328 for newer version) and powered via USB/DC power, switching automatically
  11. The Arduino Mega, using a surface-mounted ATmega1280 for additional I/O and memory.[11]

Open hardware and open source

The Arduino hardware reference designs are distributed under a Creative Commons Attribution Share-Alike 2.5 license and are available on the Arduino Web site. Layout and production files for some versions of the Arduino hardware are also available.[10] The source code for the IDE and the on-board library are available and released under the GPLv2 license.[12]

Accessory hardware

A prototyping shield, mounted on an Arduino

Arduino and clones make use of shields, which are printed circuit boards which sit atop an Arduino, and plug into the normally supplied pin-headers. These are expansions to the base Arduino. There are many functions of shields, from motor controls, to breadboarding (prototyping).[13]

For Example:

Clones

While the hardware and software designs are available under copyleft licenses, the developers have expressed a desire that the name "Arduino" (or derivatives thereof) be exclusive to the official product and not be used for derivative works without permission. The official policy document on the use of the Arduino name emphasizes that the project is open to incorporating work by others into the official product.[14]

As a result of the protected naming conventions of the Arduino, a group of Arduino users forked (in an extended meaning of the word) the Arduino Diecimila, releasing an equivalent board called Freeduino. The name Freeduino is not trademarked and is free to use for any use. [15]

Several Arduino-compatible products avoid the "Arduino" name by using 'duino' name variants. They have been commercially released by other manufacturers.

Shield-compatible clones

The following boards are fully or almost fully compatible with both the Arduino hardware and software, including being able to accept "shield" daughterboards.

  • The "Freeduino SB", manufactured and sold as a mini-kit by Solarbotics Ltd..
  • The "Freeduino MaxSerial", a board with a standard DB9 serial port, manufactured and sold assembled or as a kit by Fundamental Logic.
  • The "Freeduino Through-Hole", a board that avoids surface-mount soldering, manufactured and sold as a kit by NKC Electronics.
  • The "Illuminato", a board which uses an ATMega645 instead of an ATMega168. This provides 64K of flash, 4K of RAM and 32 general IO pins. Hardware and firmware are open source. The board is designed to look svelte and has 10 LEDs that can be controlled using a "hidden" instruction. It was developed by Liquidware.
  • The "metaboard", a board that is designed to have a very low complexity and thus a very low price. Hardware and firmware are open source. It was developed by Metalab, a hackerspace in Vienna.
  • The "Seeeduino", derived from the Diecimila.
  • The "eJackino", kit by CQ publisher in JAPAN. Similar to Seeeduino, eJackino can use Universal boards as Shields. On Back side, there is a "Akihabara station" silk, just like Italia on Arduino.
  • The "Wiseduino", is an Arduino-compatible microcontroller board, which includes a DS1307 real time clock (RTC) with backup battery, a 24LC256 EEPROM chip and a connector for XBee adapter for wireless communication.

Bootloader-compatible clones

These boards are compatible with the Arduino software but do not accept shields. They have different connectors for power and I/O, such as a series of pins on the underside of the board for use with breadboards for easy prototyping, or more specific connectors.

  • The "Oak Micros om328p" - an Arduino Duemilanove compacted down to a breadboardable device (36mm x 18mm) that can be inserted into a standard 600mil 28-pin socket, with USB capability, ATmega328p, and 6 onboard LEDs.
  • The "Boarduino" - an inexpensive Diecimila clone made for breadboarding, produced by Adafruit.
  • The "Bare Bones Board" (BBB) and "Really Bare Bones Board" (RBBB) by Modern Device - compact inexpensive clones suitable for breadboarding.
  • The "iDuino", a USB board for breadboarding, manufactured and sold as a kit by Fundamental Logic.
  • The "Sanguino" - An open source enhanced Ardiuno clone which uses an ATMega644P instead of an ATMega168. This provides 64K of flash, 4K of RAM and 32 general IO pins in a 40 pin DIP device. It was developed with the RepRap Project in mind.
  • The "LEDuino", a board with enhanced I²C, DCC decoder and CAN-bus interfaces. Manufactured using surface mount and sold assembled by Siliconrailway.
  • The "Stickduino", similar to a usb key.
  • The "Roboduino", designed for robotics. All of its connections have neighboring power buses into which servos and sensors can easily be plugged. Additional headers for power and serial communication are also provided. It was developed by Curious Inventor, L.L.C.
  • The "Wireless Widget", is a compact (35 mm x 70 mm), low voltage, battery powered Arduino clone with onboard wireless capable of ranges up to 120 m. The Wireless Widget was designed for both portable and low cost Wireless sensor network applications.

Non-ATmega boards

The following boards accept Arduino "shield" daughter boards but do not use ATmega micro-controllers. Thus they are incompatible with the Arduino IDE, although they are compatible with shield hardware and may support other IDEs.

  • The "ARMmitePRO", an ARM-based shield-compatible board from Coridium, programmable in BASIC or C.
  • The "Cortino", a development system for the 32-bit ARM Cortex M3 Microprocessor.
  • The "Pinguino", is a board based on a PIC microcontroller, with native USB support and compatibility with the Arduino programing language plus an IDE built with Python.

Development team

The core Arduino developer team is composed of Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca Martino, David Mellis and Nicholas Zambetti.

See also

References

  1. ^ a b "What makes an Arduino board an Arduino?". Arduino project. {{cite web}}: External link in |publisher= (help)
  2. ^ "Arduino build process". Arduino project. {{cite web}}: External link in |publisher= (help)
  3. ^ "Project homepage". Arduino project. {{cite web}}: External link in |publisher= (help)
  4. ^ "Interfacing Arduino to other languages". Arduino project. {{cite web}}: External link in |publisher= (help)
  5. ^ "Arduino environment". Arduino project. {{cite web}}: External link in |publisher= (help)
  6. ^ "Arduino programming language reference". Arduino project. {{cite web}}: External link in |publisher= (help)
  7. ^ "Ars Electronica Archiv" (in German). Retrieved 2009-02-18.
  8. ^ "Ars Electronica Archiv / ANERKENNUNG" (in German). Retrieved 2009-02-18.
  9. ^ Thompson, Clive (2008-10-20). "Build It. Share It. Profit. Can Open Source Hardware Work?". Wired. 16 (11): 166–176. Retrieved 2009-04-30.
  10. ^ a b "Hardware". Retrieved 2008-12-26.
  11. ^ "ArduinoBoardMega". Arduino. Retrieved 2009-03-26.
  12. ^ "Download the Arduino Software". Software. Arduino.
  13. ^ "Arduino - ArduinoShields". Arduino. Retrieved 2009-03-20.
  14. ^ "So you want to make an Arduino". Policy. Arduino. Retrieved 2009-03-17.
  15. ^ "Freeduino Open Designs". Retrieved 2008-03-03.

Bibliography

External links