This article provides a brief introduction to the Arduino Due boards. We are start with the hardware and finish with an explanation of the entire procedure for the development and testing of a simple sketch. We will see the following in the order:
Arduino Due is based on an AT91SAM3X8E processor, Cortex-ME CPU and is the first card of this family-based 32-bit ARM micro-controller. At the hardware level, it has less than 54 pins for I / O, data transmission and reception, analog inputs and much more.
The following is the pin mapping and other hardware components:
Here is a preview of the Arduino Due.
Figure 1: Arduino shield
We have said previously, that it has two mini USB ports:
Figure 2: the two mini usb on Arduino Due
And also compatible with all Arduino shields and components used on the Arduino Uno, provided that the Pin-out is the same, a practical example is that we can connect the Ethernet shield used on the Arduino Uno since the pin-out is perfectly compatible as
shown in the figure.
Figure 3: Pin out is perfectly
For more details on the hardware, see the following this link, where you can find more information and details
about it .
Now that we know the main hardware features, it is time to move to the development. This, however, involves certain procedures to be performed. First, download and install the
Arduino IDE when the latest version is 1.6.4. After installation, if you try to start the Arduino IDE, we realize that one of the available boards is not on the Board section the opportunity to select Arduino
Due. Why all this? We simply must download and install all the necessary libraries. Let's start, first we start the IDE development in the tools menu. Choose the Tools command and Boards as shown.
Figure 4: Installing libraries
We will be conducted in the Boards Manager screen, where you can download libraries for Arduino Due and the others, since we have libraries for the family of Intel boards for example.
Figure 5: Libraries for family Intel boards
We are interested in knowing how to download the libraries under the heading Arduino SAM Boards (32-bit ARM Cortex-M3), select it.
Figure 6: Arduino SAM Boards
Before you download we still need to select the version of the IDE, we select the latest version installed.
Figure 7: Board Manager
We will begin the installation process, you will download the tools needed and more files of the definitions of the boards, as shown in the following images.
Figure 8: Downloading boards
Figure 9: Downloading all the necessary files
After downloading all the necessary files, start the installation process of the boards and tools.
Figure 10: Installation process
Figure 11: Boards and tools
After installation, if everything goes well, we will show in the screen the Boards Manager the word "INSTALLED" as shown.
Figure 12: Screen Boards Manager
We now have everything you need in the software development to start with the Arduino Due, however we still must do a few things before you start to program it.
After installation, we must now go to select as the default tab Arduino Due and still select the serial port to connect the board, otherwise we cannot transfer any content. Let's see how to proceed. We will start the Arduino IDE. In the Tools menu select
Board again and unlike before, we can in the bottom of the menu item select the Arduino Due. We note that we have two choices that we're interested in and the first is the Arduino Due (the Programming Port), because as said earlier, we must not use the card
as a peripheral or host, but rather we need to program it.
Figure 13: Programming Port
After this activity, we still need to select the serial port, always from the Tools menu. Select this time the words Port and set the correct one, in my case COM4, but generally Arduino Due uses this serial port, as shown in the figure.
Figure 14: Serial port
Also set the serial port, we are ready to create a sketch of the example, for to connect an Ethernet shield to the Arduino Due as shown earlier in this article, but then we connect the Port Programming Arduino Two at the USB port of our PC that will provide
voltage to both boards.
Figure 15: Set the serial port
Now we upload the sketch of the code that you find in the article specified above, who will make the active Ethernet shield.
// Importo le librerie Ethernet
#include <SPI.h>
#include <Ethernet.h>
#include <Ethernet.h>
// Impostazioni base
byte
mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // MAC address
byte
mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// MAC address
void
setup()
void
setup()
{
// Imposto una connessione seriale per verificare i dati.
// Imposto una connessione seriale per verificare i dati.
Serial.begin(9600);
Serial.begin(9600);
// Diamo alla Ethernet shield un secondo per inizializzarsi
// Diamo alla Ethernet shield un secondo per inizializzarsi
delay(1000);
delay(1000);
}
void
loop()
loop()
{
// Connessione Ethernet usando MAC e IP fisso
// Connessione Ethernet usando MAC e IP fisso
if(Ethernet.begin(mac) == 0)
if
(Ethernet.begin(mac) == 0)
{
Serial.println("Connesso");
Serial.println(
"Connesso"
);
}
else
else
Serial.println("Errore nella connessione");
"Errore nella connessione"
}
}
}
}
With the key Load, identifiable by the symbol of an arrow to the right, we can finally send the code on the board we provided previously. This is the procedure for loading, as shown in the following images.
Figure 16: Procedure for loading 1
Figure 17: Procedure for loading 2
Figure 18: Procedure for loading 3
If everything was done correctly, we need to see the word Charging completed as shown by the last image.
In this short article, we wanted to show in general and Arduino Due, starting from the main characteristics Hardware, libraries and boards necessary to be able to program, we saw what the procedure is to select the board and serial port, then ending with
a small sketch of an example and then send everything to the board, so that you can view in a network the Ethernet shield, said as compatible with the Arduino Due. In the next step, we will see how to do communicate Arduino Due with Mobile Service on Microsoft
Azure.