<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.robolabo.etsit.upm.es/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Delias</id>
		<title>RobolaboWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.robolabo.etsit.upm.es/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Delias"/>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php/Special:Contributions/Delias"/>
		<updated>2026-04-23T13:00:37Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.3</generator>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=549</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=549"/>
				<updated>2017-04-26T11:15:59Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First of all is necessary include the following libraries in your .c file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;   /* Standard input/output definitions */&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;  /* UNIX standard function definitions */&lt;br /&gt;
#include &amp;lt;fcntl.h&amp;gt;   /* File control definitions */&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;   /* Error number definitions */&lt;br /&gt;
#include &amp;lt;termios.h&amp;gt; /* POSIX terminal control definitions */&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;  /* String function definitions */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought ACM0 port, if this port is already in use you must see the active port using in the terminal the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you have the connection activated, the next step is read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
&lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port from the PC:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you have to read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want to receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=548</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=548"/>
				<updated>2017-04-26T11:12:19Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First of all is necessary include the following libraries in your .c file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;   /* Standard input/output definitions */&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;  /* UNIX standard function definitions */&lt;br /&gt;
#include &amp;lt;fcntl.h&amp;gt;   /* File control definitions */&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;   /* Error number definitions */&lt;br /&gt;
#include &amp;lt;termios.h&amp;gt; /* POSIX terminal control definitions */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought ACM0 port, if this port is already in use you must see the active port using in the terminal the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you have the connection activated, the next step is read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
&lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port from the PC:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you have to read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want to receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=547</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=547"/>
				<updated>2017-04-26T10:55:10Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought ACM0 port, if this port is already in use you must see the active port using in the terminal the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you have the connection activated, the next step is read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
&lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port from the PC:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you have to read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want to receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=546</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=546"/>
				<updated>2017-04-26T10:52:37Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought ACM0 port, if this port is already in use you must see the active port using in the terminal the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you have the connection activated, the next step is read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port from the PC:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you have to read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want to receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=545</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=545"/>
				<updated>2017-04-26T10:51:52Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought ACM0 port, if this port is already in use you must see the active port using in the terminal the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you have the connection activated, the next step is read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port from the PC:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you have to read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=544</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=544"/>
				<updated>2017-04-26T10:50:23Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought ACM0 port, if this port is already in use you must see the active port using in the terminal the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you have the connection activated, the next step is read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port from the PC:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=543</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=543"/>
				<updated>2017-04-26T10:49:05Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought ACM0 port, if this port is already in use you must see the active port using in the terminal the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you have the connection activated, the next step is read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=542</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=542"/>
				<updated>2017-04-26T10:46:23Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought ACM0 port, if this port is already in use you must see the active port using in the terminal the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=541</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=541"/>
				<updated>2017-04-26T10:45:40Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought ACM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=540</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=540"/>
				<updated>2017-04-26T10:45:10Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0&amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=539</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=539"/>
				<updated>2017-04-26T10:44:38Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=538</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=538"/>
				<updated>2017-04-26T10:43:37Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due - PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux) - Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=537</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=537"/>
				<updated>2017-04-26T10:43:10Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due-PC(Linux). Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC(Linux)-Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=536</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=536"/>
				<updated>2017-04-26T10:41:14Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximum available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due-PC. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC-Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=535</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=535"/>
				<updated>2017-04-26T10:38:44Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximun baud rate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(More info at: https://www.arduino.cc/en/Guide/ArduinoDue)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due-PC. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC-Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=534</id>
		<title>Arduino Boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Boards&amp;diff=534"/>
				<updated>2017-04-26T10:35:22Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: Created page with &amp;quot;__TOC__  &amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;  &amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;  &amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt; &amp;lt;p&amp;gt;The USB connector of ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximun baud rate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due-PC. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC-Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=533</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=533"/>
				<updated>2017-04-26T10:35:13Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=&amp;quot;70%&amp;quot; cellspacing=&amp;quot;2px&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #bc3c1f; background-color: #F1AEA3;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Hardware&amp;quot;&amp;gt; Hardware&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Network &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Computers &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Cluster &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; [[Robots]] &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[1DOF Haptic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Novint Falcon]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Bluetooth]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;!-- &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #61B329;background-color: #DDFFDD&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Firmware&amp;quot;&amp;gt; Firmware &amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Network &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Computers &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Cluster &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Robots &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Nucleo Boards]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[SDIN Boards]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Arduino Boards]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #DDFFDD&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #1860ac; background-color: #f0f0ff;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Software&amp;quot;&amp;gt; Software&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Linux]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[LaTeX]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Subversion]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Apache2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Chai3D]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #ffca64;background-color: #FFFCE6&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Misc&amp;quot;&amp;gt; Misc &amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Image Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Video Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Music Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PDF Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Files]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[MediaWiki]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[XPS13]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #DDFFDD&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #1860ac; background-color: #DDFFDD;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Developments&amp;quot;&amp;gt; Developments&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Monitoring systems]] &amp;lt;/li&amp;gt;        &lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=532</id>
		<title>Arduino Connections</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=532"/>
				<updated>2017-04-26T10:34:32Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=531</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=531"/>
				<updated>2017-04-26T10:33:39Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=&amp;quot;70%&amp;quot; cellspacing=&amp;quot;2px&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #bc3c1f; background-color: #F1AEA3;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Hardware&amp;quot;&amp;gt; Hardware&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Network &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Computers &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Cluster &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; [[Robots]] &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[1DOF Haptic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Novint Falcon]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Bluetooth]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;!-- &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #61B329;background-color: #DDFFDD&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Firmware&amp;quot;&amp;gt; Firmware &amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Network &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Computers &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Cluster &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Robots &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Nucleo Boards]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[SDIN Boards]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Arduino Connections]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #DDFFDD&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #1860ac; background-color: #f0f0ff;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Software&amp;quot;&amp;gt; Software&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Linux]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[LaTeX]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Subversion]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Apache2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Chai3D]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #ffca64;background-color: #FFFCE6&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Misc&amp;quot;&amp;gt; Misc &amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Image Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Video Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Music Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PDF Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Files]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[MediaWiki]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[XPS13]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #DDFFDD&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #1860ac; background-color: #DDFFDD;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Developments&amp;quot;&amp;gt; Developments&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Monitoring systems]] &amp;lt;/li&amp;gt;        &lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=530</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=530"/>
				<updated>2017-04-26T10:33:07Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=&amp;quot;70%&amp;quot; cellspacing=&amp;quot;2px&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #bc3c1f; background-color: #F1AEA3;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Hardware&amp;quot;&amp;gt; Hardware&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Network &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Computers &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Cluster &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; [[Robots]] &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[1DOF Haptic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Novint Falcon]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Bluetooth]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;!-- &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #61B329;background-color: #DDFFDD&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Firmware&amp;quot;&amp;gt; Firmware &amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Network &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Computers &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Cluster &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Robots &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Nucleo Boards]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[SDIN Boards]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Arduino USB]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #DDFFDD&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #1860ac; background-color: #f0f0ff;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Software&amp;quot;&amp;gt; Software&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Linux]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[LaTeX]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Subversion]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Apache2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Chai3D]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #ffca64;background-color: #FFFCE6&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Misc&amp;quot;&amp;gt; Misc &amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Image Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Video Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Music Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PDF Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Files]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[MediaWiki]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[XPS13]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #DDFFDD&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #1860ac; background-color: #DDFFDD;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Developments&amp;quot;&amp;gt; Developments&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Monitoring systems]] &amp;lt;/li&amp;gt;        &lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=529</id>
		<title>Arduino Connections</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=529"/>
				<updated>2017-04-26T10:32:35Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximun baud rate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due-PC. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication PC-Arduino Due. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you need write the information to transmit in the USB port:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = write(fd, &amp;amp;buffer, sizeof(buffer));&lt;br /&gt;
if (n &amp;lt; 0)&lt;br /&gt;
 perror(&amp;quot;write() of bytes in USB port failed!&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then in Arduino you need read the available information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (SerialUSB.available() &amp;gt; 0)&lt;br /&gt;
 SerialUSB.readBytes(buffer, nbytes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You need specify the number of bytes you want receive &amp;quot;nbytes&amp;quot;, for a correct transmission the number of bytes transmitted and receive must be the same.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=528</id>
		<title>Arduino Connections</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=528"/>
				<updated>2017-04-26T10:08:19Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximun baud rate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due-PC. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1)&lt;br /&gt;
 /* Could not open the port*/&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1)&lt;br /&gt;
 perror(&amp;quot;No bytes received&amp;quot;);&lt;br /&gt;
else&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot; and the number of bytes received stored in &amp;quot;nbytes&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=527</id>
		<title>Arduino Connections</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=527"/>
				<updated>2017-04-26T10:04:13Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximun baud rate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due-PC. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1){&lt;br /&gt;
/*&lt;br /&gt;
 * Could not open the port.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
}else{&lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1){&lt;br /&gt;
 perror(&amp;quot;No bytes&amp;quot;);&lt;br /&gt;
} else{&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=526</id>
		<title>Arduino Connections</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=526"/>
				<updated>2017-04-26T10:03:27Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximun baud rate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch: &lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due-PC. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write&amp;lt;/p&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1){&lt;br /&gt;
/*&lt;br /&gt;
 * Could not open the port.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyACM0 - &amp;quot;);&lt;br /&gt;
}else{&lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next read the bytes transmitted:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int nbytes = read(fd, &amp;amp;buffer, sizeof(buffer));    &lt;br /&gt;
if (n == -1){&lt;br /&gt;
 perror(&amp;quot;No bytes&amp;quot;);&lt;br /&gt;
} else{&lt;br /&gt;
 printf(&amp;quot;%s\n&amp;quot;, buffer);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now you have the String transmitted stored in the array of char &amp;quot;buffer&amp;quot;.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=525</id>
		<title>Arduino Connections</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=525"/>
				<updated>2017-04-26T09:52:20Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximun baud rate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch: &lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Communication Arduino Due-PC. Native Port&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To send information from the Arduino Due to the PC using the Native port, you need write&amp;lt;/p&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SerialUSB.println(&amp;quot;String&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where String is the information that you want to transmit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To receive this information in your PC is neccesary open the USB port&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int fd = open(&amp;quot;/dev/ttyACM0&amp;quot;, O_RDWR | O_NOCTTY);&lt;br /&gt;
&lt;br /&gt;
/* wait for the Arduino to reboot */&lt;br /&gt;
usleep(500000);&lt;br /&gt;
&lt;br /&gt;
if (fd == -1){&lt;br /&gt;
/*&lt;br /&gt;
 * Could not open the port.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 perror(&amp;quot;open_port: Unable to open /dev/ttyCOM0 - &amp;quot;);&lt;br /&gt;
}else{&lt;br /&gt;
 fcntl(fd, F_SETFL, 0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default the connection between Arduino Due and PC is performed thought COM0 port, if this port is already in use you must see the active port using the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ll /dev/ttyACM*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=524</id>
		<title>Arduino Connections</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Arduino_Connections&amp;diff=524"/>
				<updated>2017-04-26T09:18:38Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: Created page with &amp;quot;__TOC__  &amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;  &amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;  &amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt; &amp;lt;p&amp;gt;The USB connector of ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Serial ports on the Arduino Due&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port Serial USB&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Native USB port is connected directly to the SAM3X MCU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB connector of the Native port is directly connected to the USB host pins of the SAM3X. Using the Native port enables you to use the Due as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices can be connected to the Due (like a mouse, keyboard, or an Android phone). This port can also be used as a virtual serial port using the '''&amp;quot;SerialUSB&amp;quot;''' object in the Arduino programming language. It is not necessary set a baud rate because Arduino Due will offer the maximun baud rate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port Serial&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Programming port is connected to an ATMEL 16U2 which acts as a USB-to-Serial converter. This Programming port is the default for uploading sketches and communicating with the Arduino.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial converter of the Programming port is connected to the first UART of the SAM3X. It's possible to communicate over this port using the '''&amp;quot;Serial&amp;quot;''' object in the Arduino programming language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Automatic (Software) Reset&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Native port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup(). This will ensure the SAM3X will wait for the SerialUSB port to open before executing the sketch: &lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
while (!Serial);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pressing the Reset button on the Due causes the SAM3X reset as well as the USB communication. This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Programming port&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X. When you open this serial port, the USB-to-Serial activates the Erase and Reset sequence before it begins communicating with the UART of the SAM3X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; The Programming port resets the board each time you open the serial monitor (or any other serial communication).&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=523</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=523"/>
				<updated>2017-04-26T08:46:40Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=&amp;quot;70%&amp;quot; cellspacing=&amp;quot;2px&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #bc3c1f; background-color: #F1AEA3;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Hardware&amp;quot;&amp;gt; Hardware&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Network &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Computers &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; Cluster &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;li&amp;gt; [[Robots]] &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[1DOF Haptic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Novint Falcon]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Bluetooth]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;!-- &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt; --&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #61B329;background-color: #DDFFDD&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Firmware&amp;quot;&amp;gt; Firmware &amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Network &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Computers &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Cluster &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; Robots &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Nucleo Boards]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[SDIN Boards]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Arduino Connections]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #DDFFDD&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #1860ac; background-color: #f0f0ff;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Software&amp;quot;&amp;gt; Software&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Linux]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[LaTeX]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Subversion]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Apache2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Chai3D]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #ffca64;background-color: #FFFCE6&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Misc&amp;quot;&amp;gt; Misc &amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Image Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Video Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Music Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PDF Tools]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Files]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[MediaWiki]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[XPS13]] &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
    &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #DDFFDD&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;td width=&amp;quot;50%&amp;quot; class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;padding: 2em; color: #000; border: 2px solid #1860ac; background-color: #DDFFDD;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt; &amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Developments&amp;quot;&amp;gt; Developments&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[Monitoring systems]] &amp;lt;/li&amp;gt;        &lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;table cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;background-color: #F1AEA3&amp;quot;&amp;gt; &amp;lt;/table&amp;gt;   &lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Apache2&amp;diff=514</id>
		<title>Apache2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Apache2&amp;diff=514"/>
				<updated>2017-03-15T13:29:43Z</updated>
		
		<summary type="html">&lt;p&gt;Delias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--__NOTOC__--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Installation &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Apache2 &amp;lt;/h2&amp;gt;&lt;br /&gt;
In order to use apache2 web server, you should install it before. In Linux Debian/Ubuntu OS:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt; NOTE: Ubuntu 14.04 LTS &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you have installed the version of Ubuntu 14.04 LTS, first you need install php 7.0. Ondřej Surý offers a PPA for PHP 7.0 on Ubuntu. Before doing anything else, log in to your system, and add Ondřej's PPA to the system's Apt sources:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo add-apt-repository ppa:ondrej/php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You'll see a description of the PPA, followed by a prompt to continue. Press Enter to proceed.&lt;br /&gt;
Once the PPA is installed, update the local package cache to include its contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, install the new packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install php7.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The next modules you need install are the same that in the next case, but using php7.0 instead of php.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing PHP and Apache2 related modules &amp;lt;/h2&amp;gt;&lt;br /&gt;
If you intend to upload a website which script includes PHP language to your Apache Server, you should install both PHP and its related modules for apache2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install php libapache2-mod-php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other modules may be added the same way. For short, if you encounter any trouble you may install every PHP module:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install php-all-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing MYSQL and PHP related modules &amp;lt;/h2&amp;gt;&lt;br /&gt;
If you intend to set a MYSQL Server on your apache-served website, you should install it before:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install mysql-server&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As well as the MYSQL PHP-related module:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install php-mysql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Example of use &amp;lt;/h1&amp;gt;&lt;br /&gt;
To test your websites on your local machine, you may add the following line to the &amp;lt;i&amp;gt;/etc/apache2/apache2.conf&amp;lt;/i&amp;gt; file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerName localhost&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy your website files to the &amp;lt;i&amp;gt;/var/www/&amp;lt;/i&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo cp -r &amp;lt;WEBSITE_ROOT_DIR_PATH&amp;gt; /var/www/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, it's important to change the default document root path in the &amp;lt;i&amp;gt;/etc/apache2/sites-available/000-default.conf&amp;lt;/i&amp;gt; file to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DocumentRoot /var/www/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And reload the apache2 service:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo service apache2 reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can check your website opening a web browser and accesing the address &amp;lt;i&amp;gt;localhost/&amp;lt;WEBSITE_ROOT_DIR_NAME&amp;gt;&amp;lt;/i&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Delias</name></author>	</entry>

	</feed>