Arduino programming environment in Russian. Arduino connection and setup

28 09.2016

Have you thought about making your life easier? So that there are things that would solve everyday, routine tasks for you. A smart device that would perform a useful function, for example, water the garden, clean the room, carry the load. These tasks can be solved. But just buying it won't be enough. Any industrial logic controller or microcircuit needs a “brain” to perform a certain sequence of actions. In our case, the Arduino programming language is suitable for performing operations.

From this article you will learn:

Greetings, friends! For those who don't know me, my name is Semyon Gridin. You can read about me. Today's article will be devoted to two main programs, without which we will not have further progress and mutual understanding.

General description of programming languages

As I wrote above, we will consider two popular development environments. By analogy with, can be divided into a graphic editor and a “smart notepad”. These are the Arduino IDE and FLprog programs.

The basis of the development environment is Processing / Wiring - this is the usual C ++, supplemented with functions and various libraries. There are several versions for windows, Mac OS and Linux operating systems.

What is their fundamental difference? The Arduino IDE is a development environment that describes program code. And FLprog is similar to CFC CoDeSyS, which allows you to draw diagrams. Which environment is best? Both are good and convenient in their own way, but if you want to get serious about controllers, it's best to learn languages ​​like C. Their main advantage is the flexibility and unlimitedness of the algorithm. I really like the Arduino IDE.

Description of Arduino IDE

The distribution can be downloaded from official website. Download the archive, it takes a little more than 100 mb. Installation is standard, like all applications for Windows. Drivers for all types of boards must be installed in the package. And this is how the working window of the program looks like.

The Arduino development environment consists of:

  • code editor;
  • message areas;
  • text output windows;
  • toolbars with buttons for frequently used commands;
  • multiple menus

Arduino IDE Settings

A program written in the Arduino development environment is calledsketch. The sketch is written in a text editor that has color highlighting of the generated program code. An example of a simple program in the picture below.

Additional functionality can be added withlibraries,which is a specially designed code. Basically, it is in the access closed from the developer. The environment usually comes with a standard set that can be added to over time. They are in the subdirectorylibraries Arduino directory.

Many libraries are supplied with examples located in the folderexample.Selecting a library from the menu will add a line to the source code:

Arduino

#include

#include

This directive is a certain instruction, a header file with a description of objects, functions, and library constants. Many functions have already been developed for most typical tasks. Believe me, it makes life easier for the programmer.

After we connected the electronic board to the computer. We carry out the following settings - we select the Arduino board and the Com port through which we will connect.

Arduino

void setup() ( // initialize digital pin 13 as an output. pinMode(13, OUTPUT); ) void loop() ( digitalWrite(13, HIGH); delay(1000); digitalWrite(13, LOW); delay(1000 );

void setup()(

// initialize digital pin 13 as an output.

pinMode(13, OUTPUT) ;

void loop()(

digitalWrite (13 , HIGH ) ;

delay(1000) ;

digitalWrite (13 , LOW ) ;

delay(1000) ;

So, by the way, it is convenient to check the performance of the board that came from the store. Fast and easy.

There is one more handy thing. It's calledSerial monitor (Serial Monitor). Displays the data sent to the platformArduino.I usually look at what signals are given to me by various sensors connected to the board.

Connecting Libraries

There are different ways to add custom functionality. There are three ways to include libraries:

  1. Using Library Manager
  2. By importing as a .zip file
  3. Installation manually.

1. Using the Library Manager.In the working window of the program, select the Sketch tab. Then click on the Add Library button. The library manager will open in front of us. The window will display already installed files with a signatureinstalled,and those that can be installed.

2. By importing as a .zip file.Often on the Internet you can find library files packed into archives with the zip extension. It contains a .h header file and a .cpp code file. During installation, you do not need to unpack the archive. It is enough in the menu Sketch - Connect Library - Add .ZIP library

3.Manual installation.First, close the Arduino IDE program. We first unpack our archive. And we transfer files with the extension .h and .cpp to a folder with the same name as the archive. We drop the folder into the root directory.

My Documents\Arduino\libraries

Description of FLPprog

FLprog is free project independent developers, allowing you to work with functional blocks, or with ladder diagrams. This environment is convenient for people - not programmers. It allows you to visually and visually see the algorithm using diagrams and function blocks. The distribution can be downloaded from official website.

I've been following the project for a long time. The guys are developing, constantly adding new functionality and changing the old one. I see perspectives in this environment. Since it performs two important functions:simplicity and ease of use.

Let's try to create a simple project with you. We will switch output 13 to the LED.

We create a new project. In the upper window, add the required number of inputs and outputs, set the name and assign the physical input or output of the board.

We pull out the elements we need from the object tree, the elements we need on the editing canvas. In our case, we can use a simple RS flip-flop to turn on and off.

After creating the algorithm, click on the compile button, the program gives a ready-made sketch on the IDE.

We have considered the possibilities and convenience of programs for developing algorithms on the Arduino series controller. There are also programs that allow you to create structural diagrams and visual pictures. But I recommend using a text editor because it will be easier for you later. Tell me, which environment do you prefer and why?

On September 22, I participated in a seminar in Krasnodar "Touch panel controllers ARIES SPK". We held a conference in the fashionable and beautiful Bristol Hotel. It was very interesting and cool.

In the first part of the seminar, we were told about the possibilities and advantages of OWEN products. After there was a coffee break with donuts. I got a bunch of everything, and donuts, and cookies, and sweets, because I was very hungry. =)

In the second part of the seminar, after lunch, we were presented. A lot of things were told about the Web - visualization. This trend is starting to gain momentum. Well, of course, control the equipment through any Internet browser. It's really cool. By the way, the equipment itself is in a suitcase.

I will publish a series of articles on CoDeSyS 3.5 in the near future. So, if anyone is interested, subscribe or just come visit. I will always be happy!

By the way, I almost forgot, the next article will be about the Arduino electronic board. It will be interesting, don't miss it.

See you in the next articles.

Sincerely, Gridin Semyon.

Hello! I am Alikin Alexander Sergeevich, a teacher of additional education, I lead the circles "Robotics" and "Radio Engineering" in the Central Children's and Youth Theater of Labinsk. I would like to talk a little about a simplified way to program Arduino using the ArduBloсk program.

I introduced this program into the educational process and am delighted with the result, it is in special demand among children, especially when writing simple programs or for creating some initial stage of complex programs. ArduBloсk is a graphical programming environment, i.e. all actions are performed with drawn pictures with signed actions in Russian, which greatly simplifies learning the Arduino platform. Children from the 2nd grade can easily master working with Arduino thanks to this program.

Yes, some might say that Scratch still exists and is also a very simple graphical environment for Arduino programming. But Scratch does not flash the Arduino, but only controls it using a USB cable. Arduino is dependent on the computer and cannot work autonomously. When creating your own projects, autonomy for Arduino is the main thing, especially when creating robotic devices.

Even the well-known LEGO robots, such as NXT or EV3, are no longer so interesting to our students with the advent of the ArduBloсk program in Arduino programming. Also, Arduino is much cheaper than any LEGO designers and many components can simply be taken from old consumer electronics. The ArduBloсk program will help not only beginners, but also active users of the Arduino platform in their work.

So, what is ArduBlock? As I said, this is a graphical programming environment. Almost completely translated into Russian. But in ArduBloсk, the highlight is not only this, but also the fact that the ArduBloсk program written by us is converted into Arduino IDE code. This program is built into the Arduino IDE programming environment, i.e. it is a plugin.

Below is an example of a blinking LED and a converted program in the Arduino IDE. All work with the program is very simple and any student can understand it.

As a result of working on the program, you can not only program the Arduino, but also study commands that are incomprehensible to us in the text format of the Arduino IDE, but if you are too lazy to write standard commands, you should quickly sketch out a simple program in ArduBlok with a quick mouse manipulation, and debug it in the Arduino IDE .

To install ArduBlok, you first need to download and install the Arduino IDE from the official Arduino website and understand the settings when working with the Arduino UNO board. How to do this is described on the same site or on Amperk, or look at YouTube. Well, when you figured out all this, you need to download ArduBlok from the official website, here. I do not recommend downloading the latest versions, they are very difficult for beginners, but the version from 2013-07-12 is the most important, this file is the most popular there.

Then, we rename the downloaded file to ardublock-all and in the "documents" folder. Create the following folders: Arduino > tools > ArduBlockTool > tool and in the latter we throw the downloaded and renamed file. ArduBlok works on all operating systems, even on Linux, I personally tested it on XP, Win7, Win8, all examples are for Win7. The installation of the program is the same for all systems.

Well, if it's easier, I prepared an archive on the Mail-disk 7z, unpacking which you will find 2 folders. In one, the Arduino IDE program is already working, and in the other folder, the contents must be sent to the documents folder.

In order to work in ArduBlok, you need to run the Arduino IDE. Then we go to the Tools tab and there we find the ArduBlok item, click on it - and here it is, our goal.

Now let's deal with the interface of the program. As you already understood, there are no settings in it, but there are plenty of icons for programming, and each of them carries a command in the Arduino IDE text format. There are even more icons in new versions, so it is difficult to deal with the latest version of ArduBlok and some of the icons are not translated into Russian.

In the section "Management" we will find a variety of cycles.

In the "Ports" section, we can manage the values ​​of the ports, as well as the sound emitters, servos or ultrasonic proximity sensors connected to them.

In the "Numbers / Constants" section, we can choose digital values ​​​​or create a variable, but you are unlikely to use the one below.

In the "Operators" section, we will find all the necessary comparison and calculation operators.

The Utilities section mostly uses icons over time.

"TinkerKit Bloks" is the section for purchased TinkerKit sensors. Of course, we don’t have such a set, but this does not mean that the icons will not work for other sets, on the contrary, it is very convenient for the guys to use icons such as turning on an LED or a button. These signs are used in almost all programs. But they have a peculiarity - when they are selected, there are incorrect icons indicating ports, so they must be removed and the icon from the “numbers / constants” section should be replaced at the top in the list.

"DF Robot" - this section is used if there are sensors specified in it, they are sometimes found. And our today's example is no exception, we have "Adjustable IR Switch" and "Line Sensor". The "line sensor" is different from the one in the picture, as it is from Amperka. Their actions are identical, but the sensor from Amperka is much better, since it has a sensitivity regulator.

Seeedstudio Grove - I have never used the sensors of this section, although there are only joysticks. This section has been expanded in new versions.

And the last section is "Linker Kit". The sensors presented in it did not come across to me.

I would like to show an example of a program on a robot moving along the strip. The robot is very simple, both in assembly and in acquisition, but first things first. Let's start with its acquisition and assembly.

Here is the set of parts itself, everything was purchased on the Amperka website.

  1. AMP-B001 Motor Shield (2 channels, 2 A) 1 890 rubles
  2. AMP-B017 Troyka Shield RUB 1,690
  3. AMP-X053 Battery compartment 3×2 AA 1 60 RUB
  4. AMP-B018 Line sensor digital 2 580 RUB
  5. ROB0049 Two-wheel platform miniQ 1 1890 RUB
  6. SEN0019 Infrared obstacle sensor 1 390 RUB
  7. FIT0032 Mount for infrared obstacle sensor 1 90 RUB
  8. A000066 Arduino Uno 1 1150 RUB

To begin with, we will assemble the wheeled platform and solder the wires to the engines.

Then we will install the racks for attaching the Arduino UNO board, which were taken from the old motherboard or other similar attachments.

Then we attach the Arduino UNO board to these racks, but we can’t fasten one bolt - the connectors get in the way. You can, of course, solder them, but it's up to you.

Next, we attach the infrared obstacle sensor to its special mount. Please note that the sensitivity control is on top, this is for ease of adjustment.

Now we install digital line sensors, here we have to look for a couple of bolts and 4 nuts for them. We install two nuts between the platform itself and the line sensor, and fix the sensors with the rest.

The next install Motor Shield or in another way you can call the motor driver. In our case, pay attention to the jumper. We will not be using a separate power supply for the motors, so it is installed in this position. The lower part is sealed with electrical tape, so that there are no accidental short circuits from the USB connector of the Arduino UNO, just in case.

Install Troyka Shield on top of Motor Shield. It is necessary for the convenience of connecting sensors. All the sensors we use are digital, so the line sensors are connected to ports 8 and 9, as they are also called pins, and the infrared obstacle sensor is connected to port 12. Be sure to note that you cannot use ports 4, 5, 6, 7 as they are used by the Motor Shield to control the motors. I even specially painted over these ports with a red marker so that the students could figure it out.

If you have already noticed, I added a black sleeve, just in case, so that the battery compartment we installed does not fly out. And finally, we fix the entire structure with an ordinary rubber band.

Battery compartment connections can be of 2 types. First wire connection to Troyka Shield. It is also possible to solder the power plug and connect it to the Arduino UNO board itself.

Here is our robot ready. Before you start programming, you will need to learn how everything works, namely:
- Motors:
Port 4 and 5 are used to control one motor, and 6 and 7 the other;
We adjust the rotation speed of the motors with PWM on ports 5 and 6;
Forward or backward by signaling ports 4 and 7.
- Sensors:
We are all digital, so they give logical signals in the form of 1 or 0;
And in order to adjust them, they have special regulators and with the help of a suitable screwdriver they can be calibrated.

Details can be found at Amperka. Why here? Because there is a lot of information on working with Arduino.

Well, we, perhaps, looked at everything superficially, studied and, of course, assembled the robot. Now it needs to be programmed, here it is - the long-awaited program!

And the program converted to Arduino IDE:

Void setup() ( pinMode(8 , INPUT); pinMode(12 , INPUT); pinMode(9 , INPUT); pinMode(4 , OUTPUT); pinMode(7 , OUTPUT); pinMode(5, OUTPUT); pinMode(6 , OUTPUT); ) void loop() ( if (digitalRead(12)) ( if (digitalRead(8)) ( if (digitalRead(9)) ( digitalWrite(4 , HIGH); analogWrite(5, 255); analogWrite( 6, 255); digitalWrite(7 , HIGH); ) else ( digitalWrite(4 , HIGH); analogWrite(5, 255); analogWrite(6, 50); digitalWrite(7 , LOW); ) ) else ( if (digitalRead (9)) ( digitalWrite(4 , LOW); analogWrite(5, 50); analogWrite(6, 255); digitalWrite(7 , HIGH); ) else ( digitalWrite(4 , HIGH); analogWrite(5, 255); analogWrite(6, 255); digitalWrite(7 , HIGH); ) ) ) else ( digitalWrite(4 , HIGH); analogWrite(5, 0); analogWrite(6, 0); digitalWrite(7 , HIGH); ) )

In conclusion, I want to say that this program is just a godsend for education, even for self-study, it will help you learn the Arduino IDE commands. The most important highlight is that with more than 50 installation icons, it starts to "fail". Yes, indeed, this is a highlight, since constant programming only on ArduBlok will not teach you how to program in the Arduino IDE. The so-called "glitch" makes it possible to think and try to remember commands for precise debugging of programs.

I wish you success.

In this tutorial, we'll install the software and run our first test program.

So, you have purchased an Arduino Uno or any other compatible board, and the next step is to install the necessary software.

First, a small digression. There is a real Arduino board made in Italy. But do not think that all the rest are fakes. The Arduino developers made all their developments publicly available and allowed everyone to create their own boards according to the created schemes. The only request is not to use the Arduino name itself, so you can find alternative names like Freeduino, Genuino, Seeeduino, Adafruit 32UT, SparkFun Pro and more. Therefore, the behavior of Chinese boards is no different from the Italian one (although there are slight differences).

There are two ways to enter the Arduino world. First, you are not a programmer. In this case, at first you can assemble the circuit from the drawings and run ready-made examples that come with the Arduino IDE or taken from other sources. If the desire to create your own projects does not disappear, then you can slowly understand the code. They are not difficult at all in the training examples, although they are written in C ++. The second case - you are a programmer, but do not understand electronics. Similarly, from the pictures you collect circuits from various devices and run the program. Once you understand what the code is doing, you can change or complicate things by trying different variations. Later, you will fill your hand and master the necessary volume for an electronics engineer in order to calculate the number of radio components needed, protect the board from short circuits and other things.

Installing the program and drivers has been simplified over the years. Microsoft decided to make friends with Arduino and in versions of Windows 8/10 the board is recognized without problems. In Windows 7, you need to work a little with the handles (description at the bottom of the page).

In addition to the Uno board itself (or any other), we need a USB cable type A-B(other boards may have different cables). It came with my kit. This is a standard cable that is usually included with printers and other devices and can be purchased from computer stores.

Next, you need to download the development environment in which we will write the code. latest version Arduino IDE can be downloaded from this page. You need to select the link corresponding to your operating system (for example, Windows) and download the archive (about 180 MB).

After you download the zip file, unzip it in any convenient folder (it is desirable that your folder name does not contain Russian characters). If you wish, you can download the ready-made installer as an exe file.

After unzipping the file, you will have a separate folder Arduino with version number with many files and subfolders.

If you successfully completed this step, then proceed to the next step - run the Arduino program (arduino.exe). You will have an Arduino development window. The program itself is written in Java and I have seen discussions that sometimes the program requires Java runtime files to be installed. I had them initially, since I write programs for Android in this language.

When I installed on Windows 8/10, there were no problems with the driver and everything was installed automatically. When working with some Chinese boards, you should also install drivers, look for information about drivers and installation on your own for your board.

We muster up the courage and connect the board with the computer using a USB cable. The board should turn green. light(marked with ON). Launch the Arduino IDE and in the menu tools | Board choose your fee. Then choose a port tools | port. Usually it is COM3, COM4.

The next step is to upload the sketch (as the Arduino program is called) to the microcontroller. The sketch itself is empty and does nothing. It is only important to make sure that it has successfully loaded. A success message will appear at the bottom of the IDE.

01.Basics: BareMinimum

Starting real work with the board is scary, suddenly something will burn. Therefore, for now, let's put it aside from harm's way and run the Arduino IDE. The board designers have prepared a series of simple examples that should be studied in order to lay the foundation for future projects. You can find them on the menu. file | Examples. In chapter 01. Basics are the simplest examples. And the most primitive of them is a sketch BareMinimum. You don't even need to pay.

In the Arduino language, projects with a listing are called sketches and have the extension INO.

Let's study the first sketch: file | Examples | 01. Basics | BareMinimum. A window will open with the following code:

void setup() ( // put your setup code here, to run once: ) void loop() ( // put your main code here, to run repeatedly: )

You now need to remember that the program must have two mandatory functions: setup() And loop(). The function name and parentheses are followed by curly braces, inside which your code will be located. It is said that between curly braces is a block of code for a function or a function body.

Function setup() runs once, after each power-up or reset of the Arduino board. In the body of this function, code is written to initialize variables, set the mode of operation of digital ports, and so on. In the following examples, you will see this mechanism.

Function loop() in an endless loop, sequentially over and over again executes the commands that are described in its body. In other words, after the function ends, it will be called again.

Inside the functions, there are comments to the code that begin with a double slash (//). Anything after the double slash and up to the end of the line is considered a comment. You can write anything here, it will not affect the program in any way. When writing your programs, I advise you not to be stingy with comments and describe what your team is doing. Believe me, many beginners, when returning to their code, cannot remember what they have programmed. Comments can be placed not only inside functions, but also above them.

You do not need to memorize the code and write it down in a notebook. When you create your own sketch through file | New, then the exact same code will appear. And you can create your projects and save them.

As you can see, the example we've looked at is just a template and doesn't do anything useful. In the next lesson, we will already learn how to connect the board and download the program to it.

Installing the Android IDE under Windows 7

For older versions, you need to install the driver yourself. When you connect for the first time, Windows will try to install the driver on its own, although we did not ask for it. Self-confident Windows admits that it failed to install the driver. To verify this, go to Start → Control Panel → System (or you could just press the Win + Pause Break keys) and select the link on the left device Manager. There we will see that there is a yellow warning icon opposite the Arduino Uno.

Nothing terrible happened. Now we will correct the situation. Click on this entry and select the item from the context menu Update drivers.... Next, select the option Search for drivers on this computer to manually specify the location of the drivers. The driver itself ArduinoUNO.inf is in a subfolder Drivers the same folder Arduino, which was mentioned above.

Now Windows will be able to install the driver correctly and everything will be tip-top.

You will need

  • Arduino UNO board;
  • USB cable (USB A - USB B);
  • Personal Computer;
  • Light-emitting diode;
  • a pair of connecting wires 5-10 cm long;
  • if available, a breadboard.
Arduino IDE

Download the Arduino development environment (Arduino IDE) from the official website for your operating system(OS Windows, Mac OS X, Linux are supported). You can choose an installer ( installer), you can archive ( ZIP file for non admin install). In the second case, the program is simply launched from the folder, without installation. The downloaded file contains, in addition to the development environment, drivers for Arduino family boards.

Download the Arduino IDE from the official website

2 Arduino connection to the computer

Connect the Arduino board with a USB cable (USB-A to USB-B type) to the computer. The green ON LED on the board should light up.


Cable "USB-A - USB-B" for connecting Arduino to a computer

3 Driver installation for Arduino

Install the Arduino driver. Consider the installation option on the Windows operating system. To do this, wait until the operating system prompts you to install the driver. Refuse. Press the keys win+pause, run device Manager. Find a section "Ports (COM and LPT)". You will see a port there with the name Arduino UNO (COMxx). Right click on it and select Update Driver. Tell the operating system the location of the driver. It is in the subdirectory drivers in the folder we just downloaded.

Take note of the port that the Arduino board is connected to. To find out the port number, open the device manager and find the "Ports (COM and LPT)" section. The port number will be listed in brackets after the board name. If the board is not listed, try disconnecting it from the computer and after waiting a few seconds, reconnect it.

Arduino in Windows Device Manager

4 Setting Arduino IDE

Specify your board for the development environment. To do this, the menu Tools Board select Arduino UNO.


Select the Arduino UNO board in the settings

Specify the number of the COM port to which the Arduino board is connected: Tools Port.


Set the serial port to which the Arduino board is connected

5 Opening the example programs

The development environment already contains many sample programs for studying the operation of the board. Open the "Blink" example: File Samples 01.Basics Blink.By the way, programs for Arduino are called "sketches".


Opening the sketch example for Arduino

6 Circuit Assembly with LED

Disconnect the Arduino from the computer. Assemble the circuit as shown in the figure. Please note that the short leg of the LED must be connected to the GND pin, the long leg to digital pin "13" of the Arduino board. It is convenient to use a breadboard, but if it is not available, connect the wires with a twist.

Digital pin "13" has a built-in resistor on the board. Therefore, when connecting the LED to the board, it is not necessary to use an external current-limiting resistor. When connecting the LED to any other Arduino pins, the use of a resistor is mandatory, otherwise you will burn the LED, and in the worst case, the Arduino port to which the LED is connected!


Scheme for connecting an LED to Arduino in Arduino memory

Now you can download the program to the board's memory. Connect the board to the computer, wait a few seconds while the board is initializing. Click the button Download, and your sketch will be written to the Arduino board. The LED should start blinking merrily at you every 2 seconds (1 second on, 1 off). Below is the code for our first Arduino program.

void setup()(// initialization block pinMode(13, OUTPUT); // set pin 13 as output. } void loop() (// loop that repeats indefinitely while the board is on: digitalWrite(13, HIGH); // we apply a high level to pin 13 - we light the LED delay(1000); // per 1000 ms = 1 sec. digitalWrite(13, LOW); // we apply a low level to pin 13 - turn off the delay LED (1000); // for 1 sec. } // then the cycle repeats

Read the comments in the text of the program - they are enough to deal with our first experiment. First, we describe the initialization block setup(), in which we set the initial values ​​\u200b\u200bof the variables and the functions of the Arduino pins. An endless loop follows loop(), which repeats over and over again as long as power is applied to the board. In this cycle, we perform all the necessary actions. In this case, we turn on and turn off the LED. Operator delay() sets the execution duration (in milliseconds) of the preceding statement. Operator digitalWrite() tells the Arduino which pin to apply voltage to, and which voltage level. Your first sketch is ready!

There are many sites on the network dedicated to working with boards of the Arduino family. Read, learn, do not be afraid to experiment and learn new things! This is an exciting and useful activity that will bring you a lot of pleasure.

note

Be careful when working with the Arduino board - it is an electronic product that requires careful handling. There are exposed conductors on the bottom of the board, and if you place the board on a conductive surface, there is a chance of burning the board. Also, do not touch the board with damp or wet hands and avoid damp environments when working.

Arduino is a hardware computing platform for a computer, the main components of which are a simple I / O board and a development environment in the Processing / Wiring language. The Arduino can be used to create standalone interactive objects, or it can be connected to software running on a computer (eg Adobe Flash, Processing, Max, ).

The Arduino Integrated Development Environment (IDE) is a cross-platform Java application that includes a code editor, a compiler, and a firmware transfer module to the board.

The development environment is based on the Processing programming language and is designed for programming by beginners who are not familiar with development software. The programming language is similar to that used in the Wiring project. Strictly speaking, this is C++, supplemented by some libraries. Programs are processed using a preprocessor and then compiled using AVR-GCC.

The Arduino board consists of an Atmel AVR microcontroller (ATmega328P and ATmega168 in newer versions and ATmega8 in older ones), as well as binding elements for programming and integration with other circuits. Many boards have a linear voltage regulator + 5V or + 3.3V. Clocking is carried out at a frequency of 16 or 8 MHz by a quartz resonator (ceramic resonator in some versions). The BootLoader is pre-flashed into the microcontroller, so an external programmer is not needed.

At a conceptual level, all boards are programmed via RS-232 ( serial connection), but the implementation of this method differs from version to version. The Serial Arduino board contains a simple inverting circuit for converting RS-232 signal levels to TTL levels, and vice versa. Current shipping boards, such as Diecimila, are programmed via USB, thanks to the FTDI FT232R USB-to-Serial converter chip. The Arduino Uno platform version uses an Atmega8 microcontroller in an SMD package as a converter. This solution allows you to program the converter so that the platform is immediately identified as a mouse, joystick or other device at the discretion of the developer with all the necessary additional control signals. Some variants, such as the Arduino Mini or the unofficial Boarduino, require a separate USB-to-Serial board or cable to be connected for programming.

Arduino boards allow you to use most of the I / O pins of the microcontroller in external circuits. For example, the Diecimila board has 14 digital inputs/outputs, 6 of which can output a PWM signal, and 6 analog inputs. These signals are available on the board via pads or headers. Several types of external expansion cards are also available, called "eng. shields" (literally: "shields"), which are connected to the Arduino board through pin headers.

Arduino Board Versions

The original Arduino boards are made by Smart Projects.

There are currently 15 board versions available, listed below.

  • Serial Arduino, programmed via serial connection (DB-9 connector), using ATmega8.
  • Arduino Extreme, with USB programming interface, uses ATmega8.
  • Arduino Mini, a miniaturized version of the Arduino using the ATmega328 surface mount.

Does not contain a USB-UART converter.

  • Arduino Nano 3.0, even smaller, USB powered and surface mount ATmega328.
  • LilyPad Arduino, a minimalistic design for wearable surface mount applications of the ATmega168 (in new versions of the ATmega328).
  • Arduino NG, with USB programming interface, uses ATmega8.
  • Arduino NG plus, with USB programming interface, uses ATmega168.
  • Arduino BT, with a Bluetooth programming interface, uses the ATmega168 (in new versions of the ATmega328).
  • Arduino Diecimila uses USB interface and Atmega168 in DIP28 package.
  • Arduino Duemilanove ("2009"), based on the ATmega168 (in new versions of the ATmega328), with automatic selection of USB or external power supply.
  • Arduino Mega ("2009"), based on the ATmega1280.
  • Arduino Mega2560 R3 ("2011"), based on the ATmega2560.
  • Arduino Uno R3 (2011), based on ATmega328.

A USB-UART converter based on ATmega16U2 is used.

  • Arduino Ethernet (2011), based on the ATmega328.

There is no USB to UART converter. Ethernet chip - W5100, also contains a microSD module.

  • Arduino Mega ADK for Android (2011), based on ATmega2560.

Contains a USB host for connecting to phones based on the Android operating system (m/s MAX3421e). USB-UART converter based on ATmega8U2.

Arduino and Arduino-compatible boards are designed in such a way that they can be expanded if necessary by adding new components to the device circuit. These expansion boards are connected to the Arduino through the pin headers installed on them.

There are many expansion boards of different functionality - from the simplest ones designed for prototyping (prototyping) to complex ones - stepper motor control boards, wireless access boards using Bluetooth, ZigBee, Wi-Fi, GSM protocols, etc.

Expansion board examples:

Arduino Ethernet Shield
XBee Shield
touch shield
Datalog Shield
USB Host Shield

The currently distributed versions can be ordered pre-soldered. Information about the board device (printed circuit board drawing) is in the public domain and can be used by those who prefer to assemble boards on their own. ATmega328 microcontrollers are cheap and cost about $3.

Arduino documentation, firmware and drawings are licensed under a Creative Commons Attribution ShareAlike 2.5 license and are available on the official Arduino website. A PCB drawing for some Arduino versions is also available. The source code for the IDE and libraries is published and available under the GNU General Public License version 2.

There is a translation of the Arduino documentation into Russian.

Arduino Awards

The Arduino project was awarded an Honorable Mention at the Prix Ars Electronica 2006 awards in the Digital Communities category.