Arduino programming

The Arduino hardware platform is supported by an open-source software package consisting of an integrated development environment (IDE), a standard programming language compiler and a boot loader that runs directly on the board.

Software development is performed using the Arduino IDE, a cross-platform application written in Java, based on the Processing programming language and the Wiring project. Although originally designed to introduce programming to artists and other newcomers unfamiliar with software development, it has features and extensions that allow more experienced programmers to be comfortable and productive. The code editor includes 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.

Arduino programs are written in C/C++, although users need to define only two functions to make a runnable program:

  • setup() – a function run once at the start of a program that can initialize settings
  • loop() – a function called repeatedly until the board powers off

The IDE also includes a C/C++ function library, which supports most common input/output operations.

The complete IDE, an extensive collection of extensions and example code, and a set of comprehensive tutorials on programming are available for free at the Arduino.cc web site.

I/O expansion (shields)

Nearly all Arduino boards can be easily expanded using mezzanine-style add-on cards known as 'shields' that connect to the MCU’s bus and I/O signals using simple 0.10” pin headers. The shield’s stackable mix-and-match connection system makes it easy to add I/O or other expansion circuitry using commercial pre-assembled boards available from several manufacturers or one of the many pin-compatible expansion shield kits on the market.

The Arduino platform has caught the interest of both the hobbyist and commercial embedded communities, resulting in a large number of specialized shields including relay boards, high-resolution multi-channel D/A or A/D converters, AC or DC power controllers, and motor controllers (Figure 5). Connecting an Arduino board to a wired network is easy, thanks to several Ethernet shields that are commercially available.





Figure 5: Rated for operating voltages of up to 30 V and 2.8 A peak output, this commercially-available Arduino-based motor control shield can drive two DC motors for robotics or motion control applications. (Courtesy of RuggedCircuits)


It is also easy to add wireless capability to your Arduino design. Shields that support ZigBee, Bluetooth and 801.11 wireless protocols are available. There are also several shields that contain a complete GSM-based cellular transceiver that supports GPRS services and run on Arduino Uno and Mega boards using the voltage provided by a computer’s USB port.

In much the same way Linux migrated from the open-source community to the commercial software market, Arduino’s low cost and versatility is beginning to build a loyal following among commercial hardware developers. While many initial applications have been developed by hobbyists and academics, it is expected that the Arduino technology used to create them will quickly find its way into commercial products.

منبع نقل مطلب از لینک :
Arduino Open Source Platform Unleashes Creativity - Microcontroller Solutions | DigiKey