<?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=Aguti</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=Aguti"/>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php/Special:Contributions/Aguti"/>
		<updated>2026-07-17T16:54:40Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.3</generator>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2096</id>
		<title>PhantomX Reactor Robot V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2096"/>
				<updated>2026-06-11T18:12:42Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for &amp;lt;b&amp;gt;Arduino SAMD&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for &amp;lt;b&amp;gt;OpenRB&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;DYNAMIXEL2Arduino&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;SAMDTimerInterrupt&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt; Dynamixel2Arduino --&amp;gt; basic --&amp;gt; ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the OpenRB-150 board&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; OpenRB-150 Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sketch-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; FOR CONFIGURATION ONLY &amp;lt;/h1&amp;gt;&lt;br /&gt;
Please download configApp from [[https://www.robolabo.etsit.upm.es/wikiFiles/PhantomReactorV2_configAPP.tgz here ]] in your prefered destination.&lt;br /&gt;
&lt;br /&gt;
Open, compile and load the .ino into the system.&lt;br /&gt;
&lt;br /&gt;
Output should look as:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Timer started OK at millis() = 3351&lt;br /&gt;
###########################&lt;br /&gt;
Please enter option 1-7 to run individual tests again.&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
7) PingServos&lt;br /&gt;
A) ServosHoming&lt;br /&gt;
B) Get Servos Pos&lt;br /&gt;
C) Move Specific Joint RAW&lt;br /&gt;
D) Test trajectory&lt;br /&gt;
E) Test Timer&lt;br /&gt;
###########################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VERY IMPORTANT!!!&amp;lt;/b&amp;gt; It is mandatory to rung option A first time, so the servos are correctly aligned. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; CHECK AFTER HERE!!!!! &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2095</id>
		<title>PhantomX Reactor Robot V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2095"/>
				<updated>2026-06-11T18:12:28Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for &amp;lt;b&amp;gt;Arduino SAMD&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for &amp;lt;b&amp;gt;OpenRB&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;DYNAMIXEL2Arduino&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;SAMDTimerInterrupt&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt; Dynamixel2Arduino --&amp;gt; basic --&amp;gt; ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the OpenRB-150 board&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; OpenRB-150 Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sketch-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; FOR CONFIGURATION ONLY &amp;lt;/h1&amp;gt;&lt;br /&gt;
Please download configApp from [[https://www.robolabo.etsit.upm.es/wikiFiles/PhantomReactorV2_configAPP.tgz here ]] in your prefered destination.&lt;br /&gt;
&lt;br /&gt;
Open, compile and load the .ino into the system.&lt;br /&gt;
&lt;br /&gt;
Output should look as:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Timer started OK at millis() = 3351&lt;br /&gt;
###########################&lt;br /&gt;
Please enter option 1-7 to run individual tests again.&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
7) PingServos&lt;br /&gt;
A) ServosHoming&lt;br /&gt;
B) Get Servos Pos&lt;br /&gt;
C) Move Specific Joint RAW&lt;br /&gt;
D) Test trajectory&lt;br /&gt;
E) Test Timer&lt;br /&gt;
###########################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VERY IMPORTANT&amp;lt;/b&amp;gt; It is mandatory to rung option A first time, so the servos are correctly aligned. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; ¡¡¡¡¡CHECK AFTER HERE!!!!! &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2094</id>
		<title>PhantomX Reactor Robot V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2094"/>
				<updated>2026-06-11T18:12:09Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for &amp;lt;b&amp;gt;Arduino SAMD&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for &amp;lt;b&amp;gt;OpenRB&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;DYNAMIXEL2Arduino&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;SAMDTimerInterrupt&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt; Dynamixel2Arduino --&amp;gt; basic --&amp;gt; ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the OpenRB-150 board&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; OpenRB-150 Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sketch-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; FOR CONFIGURATION ONLY &amp;lt;/h1&amp;gt;&lt;br /&gt;
Please download configApp from [[https://www.robolabo.etsit.upm.es/wikiFiles/PhantomReactorV2_configAPP.tgz here ]] in your prefered destination.&lt;br /&gt;
&lt;br /&gt;
Open, compile and load the .ino into the system.&lt;br /&gt;
&lt;br /&gt;
Output should look as:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Timer started OK at millis() = 3351&lt;br /&gt;
###########################&lt;br /&gt;
Please enter option 1-7 to run individual tests again.&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
7) PingServos&lt;br /&gt;
A) ServosHoming&lt;br /&gt;
B) Get Servos Pos&lt;br /&gt;
C) Move Specific Joint RAW&lt;br /&gt;
D) Test trajectory&lt;br /&gt;
E) Test Timer&lt;br /&gt;
###########################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;It is mandatory to rung option A first time, so the servos are correctly aligned. &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; ¡¡¡¡¡CHECK AFTER HERE!!!!! &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2093</id>
		<title>PhantomX Reactor Robot V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2093"/>
				<updated>2026-06-11T18:11:52Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for &amp;lt;b&amp;gt;Arduino SAMD&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for &amp;lt;b&amp;gt;OpenRB&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;DYNAMIXEL2Arduino&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;SAMDTimerInterrupt&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt; Dynamixel2Arduino --&amp;gt; basic --&amp;gt; ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the OpenRB-150 board&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; OpenRB-150 Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sketch-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; FOR CONFIGURATION ONLY &amp;lt;/h1&amp;gt;&lt;br /&gt;
Please download configApp from [[https://www.robolabo.etsit.upm.es/wikiFiles/PhantomReactorV2_configAPP.tgz here ]] in your prefered destination.&lt;br /&gt;
&lt;br /&gt;
Open, compile and load the .ino into the system.&lt;br /&gt;
&lt;br /&gt;
Output should look as:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Timer started OK at millis() = 3351&lt;br /&gt;
###########################&lt;br /&gt;
Please enter option 1-7 to run individual tests again.&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
7) PingServos&lt;br /&gt;
A) ServosHoming&lt;br /&gt;
B) Get Servos Pos&lt;br /&gt;
C) Move Specific Joint RAW&lt;br /&gt;
D) Test trajectory&lt;br /&gt;
E) Test Timer&lt;br /&gt;
###########################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is mandatory to rung option A first time, so the servos are correctly aligned. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; ¡¡¡¡¡CHECK AFTER HERE!!!!! &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2092</id>
		<title>PhantomX Reactor Robot V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2092"/>
				<updated>2026-06-11T18:09:12Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for &amp;lt;b&amp;gt;Arduino SAMD&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for &amp;lt;b&amp;gt;OpenRB&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;DYNAMIXEL2Arduino&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;SAMDTimerInterrupt&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt; Dynamixel2Arduino --&amp;gt; basic --&amp;gt; ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the OpenRB-150 board&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; OpenRB-150 Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sketch-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; FOR CONFIGURATION ONLY &amp;lt;/h1&amp;gt;&lt;br /&gt;
Please download configApp from [[https://www.robolabo.etsit.upm.es/wikiFiles/PhantomReactorV2_configAPP.tgz here ]] in your prefered destination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; ¡¡¡¡¡CHECK AFTER HERE!!!!! &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2091</id>
		<title>PhantomX Reactor Robot V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2091"/>
				<updated>2026-06-11T18:08:36Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for &amp;lt;b&amp;gt;Arduino SAMD&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for &amp;lt;b&amp;gt;OpenRB&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;DYNAMIXEL2Arduino&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;SAMDTimerInterrupt&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt; Dynamixel2Arduino --&amp;gt; basic --&amp;gt; ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the OpenRB-150 board&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; OpenRB-150 Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sketch-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; FOR CONFIGURATION ONLY &amp;lt;/h1&amp;gt;&lt;br /&gt;
Please download configApp from [[https://www.robolabo.etsit.upm.es/wikiFiles/PhantomReactorV2_configAPP.tgz here ]] in your prefered destination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; ¡¡¡¡¡CHECK AFTER HERE!!!!! &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2090</id>
		<title>PhantomX Reactor Robot V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2090"/>
				<updated>2026-06-11T18:04:07Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for &amp;lt;b&amp;gt;Arduino SAMD&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for &amp;lt;b&amp;gt;OpenRB&amp;lt;/b&amp;gt; and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;DYNAMIXEL2Arduino&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for &amp;lt;b&amp;gt;SAMDTimerInterrupt&amp;lt;/b&amp;gt; from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt; Dynamixel2Arduino --&amp;gt; basic --&amp;gt; ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the OpenRB-150 board&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; OpenRB-150 Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sketch-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=2089</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=2089"/>
				<updated>2026-06-11T18:02:04Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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;!--        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot ]] &amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot V2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot V1]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[EMG - 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; [[Nucleo OLD 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;li&amp;gt; [[Nucleo Boards for Control Systems]] &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;li&amp;gt; [[GPU server]] &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;li&amp;gt; [[Thunderbird]] &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>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2088</id>
		<title>PhantomX Reactor Robot V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2088"/>
				<updated>2026-06-11T18:01:20Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for Arduino SAMD and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for OpenRB and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for DYNAMIXEL2Arduino from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt; Dynamixel2Arduino --&amp;gt; basic --&amp;gt; ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the OpenRB-150 board&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; OpenRB-150 Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sketch-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=2087</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=2087"/>
				<updated>2026-06-11T18:00:40Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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; [[EMG - PhantomX Reactor Robot]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot V2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot V1]] &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; [[Nucleo OLD 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;li&amp;gt; [[Nucleo Boards for Control Systems]] &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;li&amp;gt; [[GPU server]] &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;li&amp;gt; [[Thunderbird]] &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>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V1&amp;diff=2086</id>
		<title>PhantomX Reactor Robot V1</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V1&amp;diff=2086"/>
				<updated>2026-06-11T18:00:03Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: Created page with &amp;quot;__TOC__  &amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from:  https://emanual.robotis.com/docs/en/parts/controller/openrb-150/#install-the-arduino-ide Ple...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: &lt;br /&gt;
https://emanual.robotis.com/docs/en/parts/controller/openrb-150/#install-the-arduino-ide&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the robot libraries from: [[https://www.robolabo.etsit.upm.es/wikiFiles/Arbotix-arduino-1-6.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find two folders: &amp;lt;b&amp;gt; hardware &amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt; libraries &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy both folders to the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\ &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\ &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you already have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, move the content of the &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder downloaded inside the &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder of &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Robot Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt;ArbotiX --&amp;gt; Tests --&amp;gt; ReactorTest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=2085</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=2085"/>
				<updated>2026-06-11T17:59:22Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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; [[EMG - PhantomX Reactor Robot]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot V2]] &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; [[Nucleo OLD 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;li&amp;gt; [[Nucleo Boards for Control Systems]] &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;li&amp;gt; [[GPU server]] &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;li&amp;gt; [[Thunderbird]] &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>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=2084</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=2084"/>
				<updated>2026-06-11T17:58:44Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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 V2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[EMG - PhantomX Reactor Robot]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot V1]] &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; [[Nucleo OLD 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;li&amp;gt; [[Nucleo Boards for Control Systems]] &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;li&amp;gt; [[GPU server]] &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;li&amp;gt; [[Thunderbird]] &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>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2083</id>
		<title>PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2083"/>
				<updated>2026-06-05T08:48:57Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for Arduino SAMD and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for OpenRB and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for DYNAMIXEL2Arduino from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt; Dynamixel2Arduino --&amp;gt; basic --&amp;gt; ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the OpenRB-150 board&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; OpenRB-150 Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sketch-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2082</id>
		<title>PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2082"/>
				<updated>2026-06-05T08:38:57Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for Arduino SAMD and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for OpenRB and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketch -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for DYNAMIXEL2Arduino from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Robot Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt;ArbotiX --&amp;gt; Tests --&amp;gt; ReactorTest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2081</id>
		<title>PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2081"/>
				<updated>2026-06-05T08:38:38Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for Arduino SAMD and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for OpenRB and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Sketcj -&amp;gt; Include library -&amp;gt; Manage Library&lt;br /&gt;
Search for DYNAMIXEL2Arduino from the Library Manager and install the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Robot Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt;ArbotiX --&amp;gt; Tests --&amp;gt; ReactorTest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2080</id>
		<title>PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2080"/>
				<updated>2026-06-05T08:34:04Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for Arduino SAMD and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Tools &amp;gt; Board &amp;gt; Boards Manager. &lt;br /&gt;
Search for OpenRB and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Robot Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt;ArbotiX --&amp;gt; Tests --&amp;gt; ReactorTest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2079</id>
		<title>PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2079"/>
				<updated>2026-06-05T08:32:38Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to Tools &amp;gt; Board &amp;gt; Boards Manager.&lt;br /&gt;
Search for Arduino SAMD and Install the latest version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Robot Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt;ArbotiX --&amp;gt; Tests --&amp;gt; ReactorTest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2078</id>
		<title>PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2078"/>
				<updated>2026-06-05T08:26:57Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
On the Arduino IDE, go to File &amp;gt; Preferences from the top menu.&lt;br /&gt;
When the Preferences window appears, copy and paste following address in the Additional Boards Manager URLs textbox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; https://raw.githubusercontent.com/ROBOTIS-GIT/OpenRB-150/master/package_openrb_index.json &amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Robot Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt;ArbotiX --&amp;gt; Tests --&amp;gt; ReactorTest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2077</id>
		<title>PhantomX Reactor Robot V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot_V2&amp;diff=2077"/>
				<updated>2026-06-05T08:16:43Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: Created page with &amp;quot;__TOC__  &amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from:  https://emanual.robotis.com/docs/en/parts/controller/openrb-150/#install-the-arduino-ide Ple...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: &lt;br /&gt;
https://emanual.robotis.com/docs/en/parts/controller/openrb-150/#install-the-arduino-ide&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the robot libraries from: [[https://www.robolabo.etsit.upm.es/wikiFiles/Arbotix-arduino-1-6.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find two folders: &amp;lt;b&amp;gt; hardware &amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt; libraries &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy both folders to the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\ &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\ &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you already have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, move the content of the &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder downloaded inside the &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder of &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Robot Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt;ArbotiX --&amp;gt; Tests --&amp;gt; ReactorTest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=2076</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=2076"/>
				<updated>2026-06-05T08:15:41Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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; [[EMG - PhantomX Reactor Robot]] &amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt; [[PhantomX Reactor Robot V2]] &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; [[Nucleo OLD 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;li&amp;gt; [[Nucleo Boards for Control Systems]] &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;li&amp;gt; [[GPU server]] &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;li&amp;gt; [[Thunderbird]] &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>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2074</id>
		<title>PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2074"/>
				<updated>2026-02-09T15:18:45Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the robot libraries from: [[https://www.robolabo.etsit.upm.es/wikiFiles/Arbotix-arduino-1-6.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find two folders: &amp;lt;b&amp;gt; hardware &amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt; libraries &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy both folders to the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\ &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\ &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you already have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, move the content of the &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder downloaded inside the &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder of &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Robot Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt;ArbotiX --&amp;gt; Tests --&amp;gt; ReactorTest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[https://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2073</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2073"/>
				<updated>2025-03-03T17:17:02Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
  digitalWrite(led,ledState);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Analog-To-Digital Converter (ADC)  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Analog-to-Digital Converter (ADC) is a device or circuit used to convert analog signals into digital values that the microcontroller can process. It enables the measurement of continuous signals, such as temperature, light intensity, or voltage, allowing for interaction with the analog world.&lt;br /&gt;
&lt;br /&gt;
The ADC operates by sampling the analog input at specific intervals and converting the measured voltage into a corresponding digital number. This conversion is typically controlled by the microcontroller’s internal clock, though external sources can be used for precise timing.&lt;br /&gt;
&lt;br /&gt;
ADCs can be configured in various modes, such as single-ended or differential inputs, continuous or single conversion, and can support features like oversampling or interrupt-driven conversions. By working independently from the main program, the ADC allows the microcontroller to perform other tasks simultaneously while capturing analog data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; ADC arduino &amp;lt;/h2&amp;gt;&lt;br /&gt;
When working with the Arduino ADC (Analog-to-Digital Converter), it is important to consider that we can only apply voltages up to a maximum of 5V (or 3.3V in specific boards). Otherwise, we risk damaging the board.&lt;br /&gt;
&lt;br /&gt;
Moreover, and Arduino UNO or the Arbotix Board have a 10bits ADC resolution.&lt;br /&gt;
This means that the 0 to 5V resolution are converted to 0-1023 value. &lt;br /&gt;
Therefore a 5V equals 1023 while 2.5V corresponds to to 512. &lt;br /&gt;
&lt;br /&gt;
In most of the boards, inputs A0 to A5 can be used as analog inputs, and the function to read it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int value = analogRead(pin);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;i&amp;gt;pin&amp;lt;/i&amp;gt; corresponds to the pin where we are reading the signal (e.g. 0, 1,...,5) and value is the return value between 0 and 1023.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;br /&gt;
For the course, we have created a module based on the XX amplifier.&lt;br /&gt;
&lt;br /&gt;
It has 5 pins being:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- +Vs positive power&lt;br /&gt;
- GND ground power&lt;br /&gt;
- -Vs negative power&lt;br /&gt;
- SIG signal&lt;br /&gt;
- GND reference to the signal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been tunned in order to need only 3 signas to connect to the arduino:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- 5V  -- To the 5V output of the arduino&lt;br /&gt;
- GND -- To the GND of the arduino&lt;br /&gt;
- SIG -- To the analog signal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2072</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2072"/>
				<updated>2025-02-26T10:01:15Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Analog-To-Digital Converter (ADC)  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Analog-to-Digital Converter (ADC) is a device or circuit used to convert analog signals into digital values that the microcontroller can process. It enables the measurement of continuous signals, such as temperature, light intensity, or voltage, allowing for interaction with the analog world.&lt;br /&gt;
&lt;br /&gt;
The ADC operates by sampling the analog input at specific intervals and converting the measured voltage into a corresponding digital number. This conversion is typically controlled by the microcontroller’s internal clock, though external sources can be used for precise timing.&lt;br /&gt;
&lt;br /&gt;
ADCs can be configured in various modes, such as single-ended or differential inputs, continuous or single conversion, and can support features like oversampling or interrupt-driven conversions. By working independently from the main program, the ADC allows the microcontroller to perform other tasks simultaneously while capturing analog data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; ADC arduino &amp;lt;/h2&amp;gt;&lt;br /&gt;
When working with the Arduino ADC (Analog-to-Digital Converter), it is important to consider that we can only apply voltages up to a maximum of 5V (or 3.3V in specific boards). Otherwise, we risk damaging the board.&lt;br /&gt;
&lt;br /&gt;
Moreover, and Arduino UNO or the Arbotix Board have a 10bits ADC resolution.&lt;br /&gt;
This means that the 0 to 5V resolution are converted to 0-1023 value. &lt;br /&gt;
Therefore a 5V equals 1023 while 2.5V corresponds to to 512. &lt;br /&gt;
&lt;br /&gt;
In most of the boards, inputs A0 to A5 can be used as analog inputs, and the function to read it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int value = analogRead(pin);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;i&amp;gt;pin&amp;lt;/i&amp;gt; corresponds to the pin where we are reading the signal (e.g. 0, 1,...,5) and value is the return value between 0 and 1023.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;br /&gt;
For the course, we have created a module based on the XX amplifier.&lt;br /&gt;
&lt;br /&gt;
It has 5 pins being:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- +Vs positive power&lt;br /&gt;
- GND ground power&lt;br /&gt;
- -Vs negative power&lt;br /&gt;
- SIG signal&lt;br /&gt;
- GND reference to the signal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been tunned in order to need only 3 signas to connect to the arduino:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- 5V  -- To the 5V output of the arduino&lt;br /&gt;
- GND -- To the GND of the arduino&lt;br /&gt;
- SIG -- To the analog signal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2071</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2071"/>
				<updated>2025-02-25T18:21:51Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Analog-To-Digital Converter (ADC)  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Analog-to-Digital Converter (ADC) is a device or circuit used to convert analog signals into digital values that the microcontroller can process. It enables the measurement of continuous signals, such as temperature, light intensity, or voltage, allowing for interaction with the analog world.&lt;br /&gt;
&lt;br /&gt;
The ADC operates by sampling the analog input at specific intervals and converting the measured voltage into a corresponding digital number. This conversion is typically controlled by the microcontroller’s internal clock, though external sources can be used for precise timing.&lt;br /&gt;
&lt;br /&gt;
ADCs can be configured in various modes, such as single-ended or differential inputs, continuous or single conversion, and can support features like oversampling or interrupt-driven conversions. By working independently from the main program, the ADC allows the microcontroller to perform other tasks simultaneously while capturing analog data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; ADC arduino &amp;lt;/h2&amp;gt;&lt;br /&gt;
When working with the Arduino ADC (Analog-to-Digital Converter), it is important to consider that we can only apply voltages up to a maximum of 5V (or 3.3V in specific boards). Otherwise, we risk damaging the board.&lt;br /&gt;
&lt;br /&gt;
Moreover, and Arduino UNO or the Arbotix Board have a 10bits ADC resolution.&lt;br /&gt;
This means that the 0 to 5V resolution are converted to 0-1023 value. &lt;br /&gt;
Therefore a 5V equals 1023 while 2.5V corresponds to to 512. &lt;br /&gt;
&lt;br /&gt;
In most of the boards, inputs A0 to A5 can be used as analog inputs, and the function to read it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int value = analogRead(pin);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;i&amp;gt;pin&amp;lt;/i&amp;gt; corresponds to the pin where we are reading the signal (e.g. A0, A1,...) and value is the return value between 0 and 1023.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;br /&gt;
For the course, we have created a module based on the XX amplifier.&lt;br /&gt;
&lt;br /&gt;
It has 5 pins being:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- +Vs positive power&lt;br /&gt;
- GND ground power&lt;br /&gt;
- -Vs negative power&lt;br /&gt;
- SIG signal&lt;br /&gt;
- GND reference to the signal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been tunned in order to need only 3 signas to connect to the arduino:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- 5V  -- To the 5V output of the arduino&lt;br /&gt;
- GND -- To the GND of the arduino&lt;br /&gt;
- SIG -- To the analog signal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2070</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2070"/>
				<updated>2025-02-25T18:14:14Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Analog-To-Digital Converter (ADC)  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Analog-to-Digital Converter (ADC) is a device or circuit used to convert analog signals into digital values that the microcontroller can process. It enables the measurement of continuous signals, such as temperature, light intensity, or voltage, allowing for interaction with the analog world.&lt;br /&gt;
&lt;br /&gt;
The ADC operates by sampling the analog input at specific intervals and converting the measured voltage into a corresponding digital number. This conversion is typically controlled by the microcontroller’s internal clock, though external sources can be used for precise timing.&lt;br /&gt;
&lt;br /&gt;
ADCs can be configured in various modes, such as single-ended or differential inputs, continuous or single conversion, and can support features like oversampling or interrupt-driven conversions. By working independently from the main program, the ADC allows the microcontroller to perform other tasks simultaneously while capturing analog data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; ADC arduino &amp;lt;/h2&amp;gt;&lt;br /&gt;
When working with the Arduino ADC (Analog-to-Digital Converter), it is important to consider that we can only apply voltages up to a maximum of 5V (or 3.3V in specific boards). Otherwise, we risk damaging the board.&lt;br /&gt;
&lt;br /&gt;
Moreover, and Arduino UNO or the Arbotix Board have a 10bits ADC resolution.&lt;br /&gt;
This means that the 0 to 5V resolution are converted to 0-1023 value. &lt;br /&gt;
Therefore a 5V equals 1023 while 2.5V corresponds to to 512. &lt;br /&gt;
&lt;br /&gt;
In most of the boards, inputs A0 to A5 can be used as analog inputs, and the function to read it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int value = analogRead(pin);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;i&amp;gt;pin&amp;lt;/i&amp;gt; corresponds to the pin where we are reading the signal (e.g. A0, A1,...) and value is the return value between 0 and 1023.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;br /&gt;
For the course, we have created a module based on the XX amplifier.&lt;br /&gt;
&lt;br /&gt;
It has 5 pins being:&lt;br /&gt;
- +Vs positive power&lt;br /&gt;
- GND ground power&lt;br /&gt;
- -Vs negative power&lt;br /&gt;
- SIG signal&lt;br /&gt;
- GND reference to the signal&lt;br /&gt;
&lt;br /&gt;
It has been tunned in order to need only 3 signas to connect to the arduino:&lt;br /&gt;
&lt;br /&gt;
- 5V  -- To the 5V output of the arduino&lt;br /&gt;
- GND -- To the GND of the arduino&lt;br /&gt;
- SIG -- To the analog signal&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2069</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2069"/>
				<updated>2025-02-25T18:07:39Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Analog-To-Digital Converter (ADC)  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Analog-to-Digital Converter (ADC) is a device or circuit used to convert analog signals into digital values that the microcontroller can process. It enables the measurement of continuous signals, such as temperature, light intensity, or voltage, allowing for interaction with the analog world.&lt;br /&gt;
&lt;br /&gt;
The ADC operates by sampling the analog input at specific intervals and converting the measured voltage into a corresponding digital number. This conversion is typically controlled by the microcontroller’s internal clock, though external sources can be used for precise timing.&lt;br /&gt;
&lt;br /&gt;
ADCs can be configured in various modes, such as single-ended or differential inputs, continuous or single conversion, and can support features like oversampling or interrupt-driven conversions. By working independently from the main program, the ADC allows the microcontroller to perform other tasks simultaneously while capturing analog data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; ADC arduino &amp;lt;/h2&amp;gt;&lt;br /&gt;
When working with the Arduino ADC (Analog-to-Digital Converter), it is important to consider that we can only apply voltages up to a maximum of 5V (or 3.3V in specific boards). Otherwise, we risk damaging the board.&lt;br /&gt;
&lt;br /&gt;
Moreover, and Arduino UNO or the Arbotix Board have a 10bits ADC resolution.&lt;br /&gt;
This means that the 0 to 5V resolution are converted to 0-1023 value. &lt;br /&gt;
Therefore a 5V equals 1023 while 2.5V corresponds to to 512. &lt;br /&gt;
&lt;br /&gt;
In most of the boards, inputs A0 to A5 can be used as analog inputs, and the function to read it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int value = analogRead(pin);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;i&amp;gt;pin&amp;lt;/i&amp;gt; corresponds to the pin where we are reading the signal (e.g. A0, A1,...) and value is the return value between 0 and 1023.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;br /&gt;
For the course, we have created a module based on the XX amplifier. &lt;br /&gt;
&lt;br /&gt;
[[File:pepe.jpg|caption]]&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2068</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2068"/>
				<updated>2025-02-25T17:48:57Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Analog-To-Digital Converter (ADC)  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Analog-to-Digital Converter (ADC) is a device or circuit used to convert analog signals into digital values that the microcontroller can process. It enables the measurement of continuous signals, such as temperature, light intensity, or voltage, allowing for interaction with the analog world.&lt;br /&gt;
&lt;br /&gt;
The ADC operates by sampling the analog input at specific intervals and converting the measured voltage into a corresponding digital number. This conversion is typically controlled by the microcontroller’s internal clock, though external sources can be used for precise timing.&lt;br /&gt;
&lt;br /&gt;
ADCs can be configured in various modes, such as single-ended or differential inputs, continuous or single conversion, and can support features like oversampling or interrupt-driven conversions. By working independently from the main program, the ADC allows the microcontroller to perform other tasks simultaneously while capturing analog data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; ADC arduino &amp;lt;/h2&amp;gt;&lt;br /&gt;
When working with the Arduino ADC (Analog-to-Digital Converter), it is important to consider that we can only apply voltages up to a maximum of 5V (or 3.3V in specific boards). Otherwise, we risk damaging the board.&lt;br /&gt;
&lt;br /&gt;
Moreover, and Arduino UNO or the Arbotix Board have a 10bits ADC resolution.&lt;br /&gt;
This means that the 0 to 5V resolution are converted to 0-1023 value. &lt;br /&gt;
Therefore a 5V equals 1023 while 2.5V corresponds to to 512. &lt;br /&gt;
&lt;br /&gt;
In most of the boards, inputs A0 to A5 can be used as analog inputs, and the function to read it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int value = analogRead(pin);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;i&amp;gt;pin&amp;lt;/i&amp;gt; corresponds to the pin where we are reading the signal (e.g. A0, A1,...) and value is the return value between 0 and 1023.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;br /&gt;
For the course, we have created a module based on the XX amplifier. &lt;br /&gt;
&lt;br /&gt;
[[File:example.jpg|caption]]&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2067</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2067"/>
				<updated>2025-02-25T17:45:06Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Analog-To-Digital Converter (ADC)  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Analog-to-Digital Converter (ADC) is a device or circuit used to convert analog signals into digital values that the microcontroller can process. It enables the measurement of continuous signals, such as temperature, light intensity, or voltage, allowing for interaction with the analog world.&lt;br /&gt;
&lt;br /&gt;
The ADC operates by sampling the analog input at specific intervals and converting the measured voltage into a corresponding digital number. This conversion is typically controlled by the microcontroller’s internal clock, though external sources can be used for precise timing.&lt;br /&gt;
&lt;br /&gt;
ADCs can be configured in various modes, such as single-ended or differential inputs, continuous or single conversion, and can support features like oversampling or interrupt-driven conversions. By working independently from the main program, the ADC allows the microcontroller to perform other tasks simultaneously while capturing analog data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; ADC arduino &amp;lt;/h2&amp;gt;&lt;br /&gt;
When working with the Arduino ADC (Analog-to-Digital Converter), it is important to consider that we can only apply voltages up to a maximum of 5V (or 3.3V in specific boards). Otherwise, we risk damaging the board.&lt;br /&gt;
&lt;br /&gt;
Moreover, and Arduino UNO or the Arbotix Board have a 10bits ADC resolution.&lt;br /&gt;
This means that the 0 to 5V resolution are converted to 0-1023 value. &lt;br /&gt;
Therefore a 5V equals 1023 while 2.5V corresponds to to 512. &lt;br /&gt;
&lt;br /&gt;
In most of the boards, inputs A0 to A5 can be used as analog inputs, and the function to read it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int value = analogRead(pin);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;i&amp;gt;pin&amp;lt;/i&amp;gt; corresponds to the pin where we are reading the signal (e.g. A0, A1,...) and value is the return value between 0 and 1023.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2066</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2066"/>
				<updated>2025-02-25T17:44:33Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Analog-To-Digital Converter (ADC)  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Analog-to-Digital Converter (ADC) is a device or circuit used to convert analog signals into digital values that the microcontroller can process. It enables the measurement of continuous signals, such as temperature, light intensity, or voltage, allowing for interaction with the analog world.&lt;br /&gt;
&lt;br /&gt;
The ADC operates by sampling the analog input at specific intervals and converting the measured voltage into a corresponding digital number. This conversion is typically controlled by the microcontroller’s internal clock, though external sources can be used for precise timing.&lt;br /&gt;
&lt;br /&gt;
ADCs can be configured in various modes, such as single-ended or differential inputs, continuous or single conversion, and can support features like oversampling or interrupt-driven conversions. By working independently from the main program, the ADC allows the microcontroller to perform other tasks simultaneously while capturing analog data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; ADC arduino &amp;lt;/h2&amp;gt;&lt;br /&gt;
When working with the Arduino ADC (Analog-to-Digital Converter), it is important to consider that we can only apply voltages up to a maximum of 5V (or 3.3V in specific boards). Otherwise, we risk damaging the board.&lt;br /&gt;
&lt;br /&gt;
Moreover, and Arduino UNO or the Arbotix Board have a 10bits ADC resolution.&lt;br /&gt;
This means that the 0 to 5V resolution are converted to 0-1023 value. &lt;br /&gt;
Therefore a 5V equals 1023 while 2.5V corresponds to to 512. &lt;br /&gt;
&lt;br /&gt;
In most of the boards, inputs A0 to A5 can be used as analog inputs, and the function to read it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int value = analogRead(pin);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;i&amp;gt;pin&amp;lt;/i&amp;gt; corresponds to the pin where we are reading the signal (e.g. A0, A1,...) and value is the return value between 0 and 1023.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2065</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2065"/>
				<updated>2025-02-25T17:38:50Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Analog-To-Digital Converter (ADC)  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Analog-to-Digital Converter (ADC) is a device or circuit used to convert analog signals into digital values that the microcontroller can process. It enables the measurement of continuous signals, such as temperature, light intensity, or voltage, allowing for interaction with the analog world.&lt;br /&gt;
&lt;br /&gt;
The ADC operates by sampling the analog input at specific intervals and converting the measured voltage into a corresponding digital number. This conversion is typically controlled by the microcontroller’s internal clock, though external sources can be used for precise timing.&lt;br /&gt;
&lt;br /&gt;
ADCs can be configured in various modes, such as single-ended or differential inputs, continuous or single conversion, and can support features like oversampling or interrupt-driven conversions. By working independently from the main program, the ADC allows the microcontroller to perform other tasks simultaneously while capturing analog data.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2064</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2064"/>
				<updated>2025-02-24T12:37:31Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to create a code that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2063</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2063"/>
				<updated>2025-02-24T12:37:06Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to initialize a function that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2062</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2062"/>
				<updated>2025-02-24T12:36:28Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long period) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds &amp;lt;/li&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long period) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;period&amp;lt;/i&amp;gt; in microseconds &amp;lt;/li&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void attachInterrupt(void (*isr)()) &amp;lt;/b&amp;gt;: Attachs a function to the timer that is called every &amp;lt;i&amp;gt; period &amp;lt;/i&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer&amp;lt;/li&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer &amp;lt;/li&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you want to initialize a function that operates every second and blinks a led you need to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;TimerOne.h&amp;gt;&lt;br /&gt;
const int led = 13;  // the pin with a LED&lt;br /&gt;
int ledState = LOW;    // El LED empieza apagado&lt;br /&gt;
&lt;br /&gt;
void setup(void)&lt;br /&gt;
{&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
  Timer1.initialize(1000000);         // 1 second period&lt;br /&gt;
  Timer1.attachInterrupt(ISR_Blink); // Activates the interrupt and links it to ISR_Blink&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(void)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ISR_Blink()&lt;br /&gt;
{   &lt;br /&gt;
  ledState = !ledState;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2061</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2061"/>
				<updated>2025-02-24T12:33:03Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Main Functions of TimerOne library &amp;lt;/h3&amp;gt;&lt;br /&gt;
This Section provides important information for the Timer handling.&lt;br /&gt;
It is based on the explanation of different methods, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; TimerOne.h &amp;lt;/i&amp;gt; must be studied.&lt;br /&gt;
&lt;br /&gt;
Main methods are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void initialize(unsigned long value) &amp;lt;/b&amp;gt;: Initializes and set the timer to &amp;lt;i&amp;gt;value&amp;lt;/i&amp;gt; in microseconds &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void setPeriod(unsigned long value) &amp;lt;/b&amp;gt;: Set the times to &amp;lt;i&amp;gt;value&amp;lt;/i&amp;gt; in microseconds &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void start(void)&amp;lt;/b&amp;gt;: Starts the timer&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void stop(void)&amp;lt;/b&amp;gt;: Stops the timer &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2060</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2060"/>
				<updated>2025-02-24T12:22:14Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&amp;lt;h3&amp;gt; Setting up the timer &amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2059</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2059"/>
				<updated>2025-02-24T12:19:10Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the timer &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2058</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2058"/>
				<updated>2025-02-24T12:18:07Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find one folder: &amp;lt;b&amp;gt; TimerOne &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy TimerOne folders to the libraries folder in the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\libraries &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\libraries &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/libraries&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you do not have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, create it and move the content inside it.&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the timer &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2057</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2057"/>
				<updated>2025-02-24T12:11:29Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the timer &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2056</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2056"/>
				<updated>2025-02-24T12:06:00Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... &lt;br /&gt;
However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the timer &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2055</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2055"/>
				<updated>2025-02-24T12:03:59Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this section is obtained from: https://www.prometec.net/timers/&lt;br /&gt;
Please refer to the previuos link and the library if you need more information.&lt;br /&gt;
&lt;br /&gt;
A timer in electronics is a device or circuit used to measure and control time intervals. &lt;br /&gt;
It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others. &lt;br /&gt;
&lt;br /&gt;
It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the timer &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2054</id>
		<title>EMG - PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=EMG_-_PhantomX_Reactor_Robot&amp;diff=2054"/>
				<updated>2025-02-24T12:00:43Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: Created page with &amp;quot;__TOC__    &amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt; &amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-gui...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Timer  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; TimerOne library &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the timer &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; EMG  &amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Main_Page&amp;diff=2053</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=2053"/>
				<updated>2025-02-24T11:59:09Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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; [[EMG - 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; [[Nucleo OLD 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;li&amp;gt; [[Nucleo Boards for Control Systems]] &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;li&amp;gt; [[GPU server]] &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;li&amp;gt; [[Thunderbird]] &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>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2052</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2052"/>
				<updated>2023-06-28T04:43:08Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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;pre&amp;gt;&lt;br /&gt;
apt-get install texlive-full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Latex Manuals &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual1.pdf Manual 1 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual2.pdf Manual 2 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual3.pdf Manual 3 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Templates &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Trabajos Fin de Titulación (Pure Latex with Makefile) : [[http://www.robolabo.etsit.upm.es/wikiFiles/templateTFT_v2023.tgz templateTFT_v2023.tgz ]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Trabajos Fin de Titulación (Overleaf): [[http://www.robolabo.etsit.upm.es/wikiFiles/2023-LatexOverleafTemplate.tgz 2023-LatexOverleafTemplate.tgz]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Presentaciones: [[http://www.robolabo.etsit.upm.es/wikiFiles/tfg_presentation.tgz pres_template.tgz]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_OverleafTemplate.zip Overleaf template ]&amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;li&amp;gt; Trabajos Fin de Grado: [[media:tfg_export.tgz | tfg_template.tgz]]&amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some considerations you need to define in src/tft.tex:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you want a double-side printing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[twoside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or a single-side printing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[oneside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The template has two colors to be implemented for titles and headers: orange&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[orange]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or  black&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[black]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; If compiling with latex (as with makefile provided), this line should be uncommented:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
\usepackage[dvipdfm]{hyperref} % Use it if compiling with latex (default on makefile)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the contrary, if using pdflatex (as for example overleaf), this line should be uncommented:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage{hyperref} % Use it if compiling with with pdflatex (default on overleaf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Bibtex &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bibliography style for the different elements to cite inside the document.&lt;br /&gt;
ALIAS is referred to the name of the bibtex element that you are going to cite it. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Article &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@ARTICLE{ALIAS,&lt;br /&gt;
 author  = {{AUTHOR}},&lt;br /&gt;
 title   = {{TITLE}},&lt;br /&gt;
 journal = {{JOURNAL}},&lt;br /&gt;
 volume  = {{VOLUME}},&lt;br /&gt;
 number  = {{NUMBER}},&lt;br /&gt;
 pages   = {{PAGES}},&lt;br /&gt;
 year    = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Collection of books &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INCOLLECTION{ExIncollec01,&lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 editor    = {{EDITOR}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Conference proceedings &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INPROCEEDINGS{ExInpro01, &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Technical Report &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@TECHREPORT{ALIAS,&lt;br /&gt;
 author      = {{AUTHOR}},&lt;br /&gt;
 title 	     = {{TITLE}},&lt;br /&gt;
 institution = {{INSTITUTION}},&lt;br /&gt;
 number      = {{NUMBER}},&lt;br /&gt;
 year        = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Books &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@BOOK{ALIAS,      &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; PHD Thesis &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@PHDTHESIS{ALIAS,&lt;br /&gt;
 author = {{AUTHOR}},&lt;br /&gt;
 title  = {{TITLE}},&lt;br /&gt;
 school = {{SCHOOL}},	&lt;br /&gt;
 year   = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Web Links &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@MISC{ALIAS,&lt;br /&gt;
 author       = {{AUTHOR}},&lt;br /&gt;
 title        = {{TITLE}},&lt;br /&gt;
 howpublished = {\url{LINK}},&lt;br /&gt;
 year         = {{YEAR}},&lt;br /&gt;
 note         = {[Online; accessed DATE]}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; TikZ &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some problems have been reported when compiling  TikZ with TexLive 2009.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation Problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
Whether compiling you get: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
I can't  find file tikzlibrary&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it is possible you have problems with TexLive and  need to install  new TexLive version.&lt;br /&gt;
&lt;br /&gt;
Download TexLive 2011 image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://ftp.oleane.net/pub/CTAN/systems/texlive/Images/texlive2011.iso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the .iso image as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount -o loop -t iso9660 texlive2011.iso /media/cdrom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install TexLive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./install-tl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Options -&amp;gt; Create SymLinks -&amp;gt; [Chose Standar Dirs]&lt;br /&gt;
Install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation works, but not pictures shown &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get last pgf package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://downloads.sourceforge.net/project/pgf/pgf/version%202.10/ \&lt;br /&gt;
  pgf_2.10.tds.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpgf%2F&amp;amp;ts= \&lt;br /&gt;
  1338847489&amp;amp;use_mirror=netcologne&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded file.&lt;br /&gt;
Substitute the old pgp package by the new downloaded one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mv tex/generic/pgf/* /usr/share/texmf/tex/generic/pgf/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Execute as superuser:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
texhash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; DVI problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dvipdfm does not completelly supports tikz options.&lt;br /&gt;
Modify it by dvipdfmx&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Videos on Beamer &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [[media:videoLatexTemplate.tgz | videoLatexTemplate.tgz]] there is an example with two different options to include videos on beamer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The first one inserts the video on the pdf.&lt;br /&gt;
There is a &amp;lt;i&amp;gt;video2image.sh&amp;lt;/i&amp;gt; script that converts a video into different frames (.EPS).&lt;br /&gt;
It requires ffmpeg and sam2p.&lt;br /&gt;
&lt;br /&gt;
Later on &amp;lt;i&amp;gt; animategraphics &amp;lt;/i&amp;gt; is in charge of moving the frames:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\animategraphics[autoplay,loop,width=6cm]{&amp;lt;NUM_FRAME&amp;gt;{mov/&amp;lt;VIDEO_FOLDER&amp;gt;}{&amp;lt;FIRST_FRAME&amp;gt;}{&amp;lt;LAST_FRAME&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
The second one inserts an image that one pressed launches a player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\movie[externalviewer]{\includegraphics[width=0.5cm]{figs/&amp;lt;FIG_ICON&amp;gt;}}{mov/&amp;lt;VIDEO_FILE&amp;gt;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile you need to run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make videos&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Memory size limit &amp;lt;/h1&amp;gt;&lt;br /&gt;
If you get something like this: TeX capacity exceeded, sorry [main memory size=5000000].&lt;br /&gt;
&lt;br /&gt;
Run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kpsewhich texmf.cnf &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit, the file that it outputs regardless it says not to touch&lt;br /&gt;
&lt;br /&gt;
Add the follwing line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main_memory = 8000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you need to update the system:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fmtutil-sys --all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, it should work&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2051</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2051"/>
				<updated>2023-06-26T08:27:42Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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;pre&amp;gt;&lt;br /&gt;
apt-get install texlive-full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Latex Manuals &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual1.pdf Manual 1 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual2.pdf Manual 2 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual3.pdf Manual 3 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Templates &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Trabajos Fin de Titulación (Pure Latex with Makefile) : [[http://www.robolabo.etsit.upm.es/wikiFiles/templateTFT_v2023.tgz templateTFT_v2023.tgz ]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Trabajos Fin de Titulación (Overleaf): [[http://www.robolabo.etsit.upm.es/wikiFiles/2023-LatexOverleafTemplate.zip 2023-LatexOverleafTemplate.zip]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Presentaciones: [[http://www.robolabo.etsit.upm.es/wikiFiles/tfg_presentation.tgz pres_template.tgz]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_OverleafTemplate.zip Overleaf template ]&amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;li&amp;gt; Trabajos Fin de Grado: [[media:tfg_export.tgz | tfg_template.tgz]]&amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some considerations you need to define in src/tft.tex:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you want a double-side printing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[twoside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or a single-side printing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[oneside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The template has two colors to be implemented for titles and headers: orange&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[orange]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or  black&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[black]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; If compiling with latex (as with makefile provided), this line should be uncommented:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
\usepackage[dvipdfm]{hyperref} % Use it if compiling with latex (default on makefile)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the contrary, if using pdflatex (as for example overleaf), this line should be uncommented:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage{hyperref} % Use it if compiling with with pdflatex (default on overleaf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Bibtex &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bibliography style for the different elements to cite inside the document.&lt;br /&gt;
ALIAS is referred to the name of the bibtex element that you are going to cite it. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Article &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@ARTICLE{ALIAS,&lt;br /&gt;
 author  = {{AUTHOR}},&lt;br /&gt;
 title   = {{TITLE}},&lt;br /&gt;
 journal = {{JOURNAL}},&lt;br /&gt;
 volume  = {{VOLUME}},&lt;br /&gt;
 number  = {{NUMBER}},&lt;br /&gt;
 pages   = {{PAGES}},&lt;br /&gt;
 year    = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Collection of books &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INCOLLECTION{ExIncollec01,&lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 editor    = {{EDITOR}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Conference proceedings &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INPROCEEDINGS{ExInpro01, &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Technical Report &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@TECHREPORT{ALIAS,&lt;br /&gt;
 author      = {{AUTHOR}},&lt;br /&gt;
 title 	     = {{TITLE}},&lt;br /&gt;
 institution = {{INSTITUTION}},&lt;br /&gt;
 number      = {{NUMBER}},&lt;br /&gt;
 year        = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Books &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@BOOK{ALIAS,      &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; PHD Thesis &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@PHDTHESIS{ALIAS,&lt;br /&gt;
 author = {{AUTHOR}},&lt;br /&gt;
 title  = {{TITLE}},&lt;br /&gt;
 school = {{SCHOOL}},	&lt;br /&gt;
 year   = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Web Links &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@MISC{ALIAS,&lt;br /&gt;
 author       = {{AUTHOR}},&lt;br /&gt;
 title        = {{TITLE}},&lt;br /&gt;
 howpublished = {\url{LINK}},&lt;br /&gt;
 year         = {{YEAR}},&lt;br /&gt;
 note         = {[Online; accessed DATE]}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; TikZ &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some problems have been reported when compiling  TikZ with TexLive 2009.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation Problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
Whether compiling you get: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
I can't  find file tikzlibrary&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it is possible you have problems with TexLive and  need to install  new TexLive version.&lt;br /&gt;
&lt;br /&gt;
Download TexLive 2011 image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://ftp.oleane.net/pub/CTAN/systems/texlive/Images/texlive2011.iso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the .iso image as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount -o loop -t iso9660 texlive2011.iso /media/cdrom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install TexLive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./install-tl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Options -&amp;gt; Create SymLinks -&amp;gt; [Chose Standar Dirs]&lt;br /&gt;
Install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation works, but not pictures shown &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get last pgf package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://downloads.sourceforge.net/project/pgf/pgf/version%202.10/ \&lt;br /&gt;
  pgf_2.10.tds.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpgf%2F&amp;amp;ts= \&lt;br /&gt;
  1338847489&amp;amp;use_mirror=netcologne&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded file.&lt;br /&gt;
Substitute the old pgp package by the new downloaded one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mv tex/generic/pgf/* /usr/share/texmf/tex/generic/pgf/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Execute as superuser:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
texhash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; DVI problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dvipdfm does not completelly supports tikz options.&lt;br /&gt;
Modify it by dvipdfmx&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Videos on Beamer &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [[media:videoLatexTemplate.tgz | videoLatexTemplate.tgz]] there is an example with two different options to include videos on beamer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The first one inserts the video on the pdf.&lt;br /&gt;
There is a &amp;lt;i&amp;gt;video2image.sh&amp;lt;/i&amp;gt; script that converts a video into different frames (.EPS).&lt;br /&gt;
It requires ffmpeg and sam2p.&lt;br /&gt;
&lt;br /&gt;
Later on &amp;lt;i&amp;gt; animategraphics &amp;lt;/i&amp;gt; is in charge of moving the frames:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\animategraphics[autoplay,loop,width=6cm]{&amp;lt;NUM_FRAME&amp;gt;{mov/&amp;lt;VIDEO_FOLDER&amp;gt;}{&amp;lt;FIRST_FRAME&amp;gt;}{&amp;lt;LAST_FRAME&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
The second one inserts an image that one pressed launches a player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\movie[externalviewer]{\includegraphics[width=0.5cm]{figs/&amp;lt;FIG_ICON&amp;gt;}}{mov/&amp;lt;VIDEO_FILE&amp;gt;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile you need to run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make videos&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Memory size limit &amp;lt;/h1&amp;gt;&lt;br /&gt;
If you get something like this: TeX capacity exceeded, sorry [main memory size=5000000].&lt;br /&gt;
&lt;br /&gt;
Run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kpsewhich texmf.cnf &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit, the file that it outputs regardless it says not to touch&lt;br /&gt;
&lt;br /&gt;
Add the follwing line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main_memory = 8000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you need to update the system:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fmtutil-sys --all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, it should work&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2050</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2050"/>
				<updated>2023-06-26T08:27:21Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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;pre&amp;gt;&lt;br /&gt;
apt-get install texlive-full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Latex Manuals &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual1.pdf Manual 1 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual2.pdf Manual 2 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual3.pdf Manual 3 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Templates &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Trabajos Fin de Titulación (Pure Latex with Makefile) : [[http://www.robolabo.etsit.upm.es/wikiFiles/templateTFT_v2023.tgz templateTFT_v2023.tgz ]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Trabajos Fin de Titulación (OVerleag): [[http://www.robolabo.etsit.upm.es/wikiFiles/2023-LatexOverleafTemplate.zip 2023-LatexOverleafTemplate.zip]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Presentaciones: [[http://www.robolabo.etsit.upm.es/wikiFiles/tfg_presentation.tgz pres_template.tgz]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_OverleafTemplate.zip Overleaf template ]&amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/wikiFiles/2023-Latex_OverleafTemplate.zip Overleaf template ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;li&amp;gt; Trabajos Fin de Grado: [[media:tfg_export.tgz | tfg_template.tgz]]&amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some considerations you need to define in src/tft.tex:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you want a double-side printing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[twoside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or a single-side printing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[oneside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The template has two colors to be implemented for titles and headers: orange&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[orange]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or  black&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[black]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; If compiling with latex (as with makefile provided), this line should be uncommented:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
\usepackage[dvipdfm]{hyperref} % Use it if compiling with latex (default on makefile)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the contrary, if using pdflatex (as for example overleaf), this line should be uncommented:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage{hyperref} % Use it if compiling with with pdflatex (default on overleaf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Bibtex &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bibliography style for the different elements to cite inside the document.&lt;br /&gt;
ALIAS is referred to the name of the bibtex element that you are going to cite it. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Article &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@ARTICLE{ALIAS,&lt;br /&gt;
 author  = {{AUTHOR}},&lt;br /&gt;
 title   = {{TITLE}},&lt;br /&gt;
 journal = {{JOURNAL}},&lt;br /&gt;
 volume  = {{VOLUME}},&lt;br /&gt;
 number  = {{NUMBER}},&lt;br /&gt;
 pages   = {{PAGES}},&lt;br /&gt;
 year    = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Collection of books &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INCOLLECTION{ExIncollec01,&lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 editor    = {{EDITOR}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Conference proceedings &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INPROCEEDINGS{ExInpro01, &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Technical Report &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@TECHREPORT{ALIAS,&lt;br /&gt;
 author      = {{AUTHOR}},&lt;br /&gt;
 title 	     = {{TITLE}},&lt;br /&gt;
 institution = {{INSTITUTION}},&lt;br /&gt;
 number      = {{NUMBER}},&lt;br /&gt;
 year        = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Books &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@BOOK{ALIAS,      &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; PHD Thesis &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@PHDTHESIS{ALIAS,&lt;br /&gt;
 author = {{AUTHOR}},&lt;br /&gt;
 title  = {{TITLE}},&lt;br /&gt;
 school = {{SCHOOL}},	&lt;br /&gt;
 year   = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Web Links &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@MISC{ALIAS,&lt;br /&gt;
 author       = {{AUTHOR}},&lt;br /&gt;
 title        = {{TITLE}},&lt;br /&gt;
 howpublished = {\url{LINK}},&lt;br /&gt;
 year         = {{YEAR}},&lt;br /&gt;
 note         = {[Online; accessed DATE]}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; TikZ &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some problems have been reported when compiling  TikZ with TexLive 2009.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation Problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
Whether compiling you get: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
I can't  find file tikzlibrary&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it is possible you have problems with TexLive and  need to install  new TexLive version.&lt;br /&gt;
&lt;br /&gt;
Download TexLive 2011 image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://ftp.oleane.net/pub/CTAN/systems/texlive/Images/texlive2011.iso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the .iso image as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount -o loop -t iso9660 texlive2011.iso /media/cdrom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install TexLive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./install-tl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Options -&amp;gt; Create SymLinks -&amp;gt; [Chose Standar Dirs]&lt;br /&gt;
Install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation works, but not pictures shown &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get last pgf package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://downloads.sourceforge.net/project/pgf/pgf/version%202.10/ \&lt;br /&gt;
  pgf_2.10.tds.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpgf%2F&amp;amp;ts= \&lt;br /&gt;
  1338847489&amp;amp;use_mirror=netcologne&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded file.&lt;br /&gt;
Substitute the old pgp package by the new downloaded one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mv tex/generic/pgf/* /usr/share/texmf/tex/generic/pgf/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Execute as superuser:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
texhash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; DVI problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dvipdfm does not completelly supports tikz options.&lt;br /&gt;
Modify it by dvipdfmx&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Videos on Beamer &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [[media:videoLatexTemplate.tgz | videoLatexTemplate.tgz]] there is an example with two different options to include videos on beamer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The first one inserts the video on the pdf.&lt;br /&gt;
There is a &amp;lt;i&amp;gt;video2image.sh&amp;lt;/i&amp;gt; script that converts a video into different frames (.EPS).&lt;br /&gt;
It requires ffmpeg and sam2p.&lt;br /&gt;
&lt;br /&gt;
Later on &amp;lt;i&amp;gt; animategraphics &amp;lt;/i&amp;gt; is in charge of moving the frames:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\animategraphics[autoplay,loop,width=6cm]{&amp;lt;NUM_FRAME&amp;gt;{mov/&amp;lt;VIDEO_FOLDER&amp;gt;}{&amp;lt;FIRST_FRAME&amp;gt;}{&amp;lt;LAST_FRAME&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
The second one inserts an image that one pressed launches a player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\movie[externalviewer]{\includegraphics[width=0.5cm]{figs/&amp;lt;FIG_ICON&amp;gt;}}{mov/&amp;lt;VIDEO_FILE&amp;gt;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile you need to run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make videos&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Memory size limit &amp;lt;/h1&amp;gt;&lt;br /&gt;
If you get something like this: TeX capacity exceeded, sorry [main memory size=5000000].&lt;br /&gt;
&lt;br /&gt;
Run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kpsewhich texmf.cnf &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit, the file that it outputs regardless it says not to touch&lt;br /&gt;
&lt;br /&gt;
Add the follwing line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main_memory = 8000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you need to update the system:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fmtutil-sys --all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, it should work&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2049</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2049"/>
				<updated>2023-06-26T08:25:54Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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;pre&amp;gt;&lt;br /&gt;
apt-get install texlive-full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Latex Manuals &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual1.pdf Manual 1 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual2.pdf Manual 2 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual3.pdf Manual 3 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Templates &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Trabajos Fin de Titulación: [[http://www.robolabo.etsit.upm.es/wikiFiles/templateTFT_v2023.tgz templateTFT_v2023.tgz ]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Presentaciones: [[http://www.robolabo.etsit.upm.es/wikiFiles/tfg_presentation.tgz pres_template.tgz]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_OverleafTemplate.zip Overleaf template ]&amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/wikiFiles/2023-Latex_OverleafTemplate.zip Overleaf template ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;li&amp;gt; Trabajos Fin de Grado: [[media:tfg_export.tgz | tfg_template.tgz]]&amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some considerations you need to define in src/tft.tex:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you want a double-side printing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[twoside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or a single-side printing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[oneside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The template has two colors to be implemented for titles and headers: orange&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[orange]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or  black&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[black]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; If compiling with latex (as with makefile provided), this line should be uncommented:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
\usepackage[dvipdfm]{hyperref} % Use it if compiling with latex (default on makefile)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the contrary, if using pdflatex (as for example overleaf), this line should be uncommented:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage{hyperref} % Use it if compiling with with pdflatex (default on overleaf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Bibtex &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bibliography style for the different elements to cite inside the document.&lt;br /&gt;
ALIAS is referred to the name of the bibtex element that you are going to cite it. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Article &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@ARTICLE{ALIAS,&lt;br /&gt;
 author  = {{AUTHOR}},&lt;br /&gt;
 title   = {{TITLE}},&lt;br /&gt;
 journal = {{JOURNAL}},&lt;br /&gt;
 volume  = {{VOLUME}},&lt;br /&gt;
 number  = {{NUMBER}},&lt;br /&gt;
 pages   = {{PAGES}},&lt;br /&gt;
 year    = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Collection of books &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INCOLLECTION{ExIncollec01,&lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 editor    = {{EDITOR}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Conference proceedings &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INPROCEEDINGS{ExInpro01, &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Technical Report &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@TECHREPORT{ALIAS,&lt;br /&gt;
 author      = {{AUTHOR}},&lt;br /&gt;
 title 	     = {{TITLE}},&lt;br /&gt;
 institution = {{INSTITUTION}},&lt;br /&gt;
 number      = {{NUMBER}},&lt;br /&gt;
 year        = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Books &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@BOOK{ALIAS,      &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; PHD Thesis &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@PHDTHESIS{ALIAS,&lt;br /&gt;
 author = {{AUTHOR}},&lt;br /&gt;
 title  = {{TITLE}},&lt;br /&gt;
 school = {{SCHOOL}},	&lt;br /&gt;
 year   = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Web Links &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@MISC{ALIAS,&lt;br /&gt;
 author       = {{AUTHOR}},&lt;br /&gt;
 title        = {{TITLE}},&lt;br /&gt;
 howpublished = {\url{LINK}},&lt;br /&gt;
 year         = {{YEAR}},&lt;br /&gt;
 note         = {[Online; accessed DATE]}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; TikZ &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some problems have been reported when compiling  TikZ with TexLive 2009.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation Problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
Whether compiling you get: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
I can't  find file tikzlibrary&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it is possible you have problems with TexLive and  need to install  new TexLive version.&lt;br /&gt;
&lt;br /&gt;
Download TexLive 2011 image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://ftp.oleane.net/pub/CTAN/systems/texlive/Images/texlive2011.iso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the .iso image as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount -o loop -t iso9660 texlive2011.iso /media/cdrom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install TexLive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./install-tl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Options -&amp;gt; Create SymLinks -&amp;gt; [Chose Standar Dirs]&lt;br /&gt;
Install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation works, but not pictures shown &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get last pgf package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://downloads.sourceforge.net/project/pgf/pgf/version%202.10/ \&lt;br /&gt;
  pgf_2.10.tds.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpgf%2F&amp;amp;ts= \&lt;br /&gt;
  1338847489&amp;amp;use_mirror=netcologne&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded file.&lt;br /&gt;
Substitute the old pgp package by the new downloaded one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mv tex/generic/pgf/* /usr/share/texmf/tex/generic/pgf/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Execute as superuser:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
texhash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; DVI problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dvipdfm does not completelly supports tikz options.&lt;br /&gt;
Modify it by dvipdfmx&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Videos on Beamer &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [[media:videoLatexTemplate.tgz | videoLatexTemplate.tgz]] there is an example with two different options to include videos on beamer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The first one inserts the video on the pdf.&lt;br /&gt;
There is a &amp;lt;i&amp;gt;video2image.sh&amp;lt;/i&amp;gt; script that converts a video into different frames (.EPS).&lt;br /&gt;
It requires ffmpeg and sam2p.&lt;br /&gt;
&lt;br /&gt;
Later on &amp;lt;i&amp;gt; animategraphics &amp;lt;/i&amp;gt; is in charge of moving the frames:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\animategraphics[autoplay,loop,width=6cm]{&amp;lt;NUM_FRAME&amp;gt;{mov/&amp;lt;VIDEO_FOLDER&amp;gt;}{&amp;lt;FIRST_FRAME&amp;gt;}{&amp;lt;LAST_FRAME&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
The second one inserts an image that one pressed launches a player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\movie[externalviewer]{\includegraphics[width=0.5cm]{figs/&amp;lt;FIG_ICON&amp;gt;}}{mov/&amp;lt;VIDEO_FILE&amp;gt;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile you need to run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make videos&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Memory size limit &amp;lt;/h1&amp;gt;&lt;br /&gt;
If you get something like this: TeX capacity exceeded, sorry [main memory size=5000000].&lt;br /&gt;
&lt;br /&gt;
Run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kpsewhich texmf.cnf &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit, the file that it outputs regardless it says not to touch&lt;br /&gt;
&lt;br /&gt;
Add the follwing line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main_memory = 8000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you need to update the system:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fmtutil-sys --all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, it should work&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2048</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=LaTeX&amp;diff=2048"/>
				<updated>2023-06-01T17:56:29Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &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;pre&amp;gt;&lt;br /&gt;
apt-get install texlive-full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Latex Manuals &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual1.pdf Manual 1 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual2.pdf Manual 2 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_Manual3.pdf Manual 3 ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Templates &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Trabajos Fin de Titulación: [[http://www.robolabo.etsit.upm.es/wikiFiles/templateTFT_v2020.tgz templateTFT_v2020.tgz ]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Presentaciones: [[http://www.robolabo.etsit.upm.es/wikiFiles/tfg_presentation.tgz pres_template.tgz]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [http://www.robolabo.etsit.upm.es/publications/courses/2020-Latex_OverleafTemplate.zip Overleaf template ]&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;li&amp;gt; Trabajos Fin de Grado: [[media:tfg_export.tgz | tfg_template.tgz]]&amp;lt;/li&amp;gt;--&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some considerations you need to define in src/tft.tex:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you want a double-side printing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[twoside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or a single-side printing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\documentclass[oneside,a4paper,11pt]{book} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The template has two colors to be implemented for titles and headers: orange&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[orange]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or  black&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage[black]{tft} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; If compiling with latex (as with makefile provided), this line should be uncommented:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
\usepackage[dvipdfm]{hyperref} % Use it if compiling with latex (default on makefile)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the contrary, if using pdflatex (as for example overleaf), this line should be uncommented:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\usepackage{hyperref} % Use it if compiling with with pdflatex (default on overleaf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Bibtex &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bibliography style for the different elements to cite inside the document.&lt;br /&gt;
ALIAS is referred to the name of the bibtex element that you are going to cite it. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Article &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@ARTICLE{ALIAS,&lt;br /&gt;
 author  = {{AUTHOR}},&lt;br /&gt;
 title   = {{TITLE}},&lt;br /&gt;
 journal = {{JOURNAL}},&lt;br /&gt;
 volume  = {{VOLUME}},&lt;br /&gt;
 number  = {{NUMBER}},&lt;br /&gt;
 pages   = {{PAGES}},&lt;br /&gt;
 year    = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Collection of books &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INCOLLECTION{ExIncollec01,&lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 editor    = {{EDITOR}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Conference proceedings &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@INPROCEEDINGS{ExInpro01, &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 booktitle = {{BOOKTITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 pages     = {{PAGES}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Technical Report &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@TECHREPORT{ALIAS,&lt;br /&gt;
 author      = {{AUTHOR}},&lt;br /&gt;
 title 	     = {{TITLE}},&lt;br /&gt;
 institution = {{INSTITUTION}},&lt;br /&gt;
 number      = {{NUMBER}},&lt;br /&gt;
 year        = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Books &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@BOOK{ALIAS,      &lt;br /&gt;
 author    = {{AUTHOR}},&lt;br /&gt;
 title 	   = {{TITLE}},&lt;br /&gt;
 publisher = {{PUBLISHER}},&lt;br /&gt;
 address   = {{ADRESS}},&lt;br /&gt;
 year      = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; PHD Thesis &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@PHDTHESIS{ALIAS,&lt;br /&gt;
 author = {{AUTHOR}},&lt;br /&gt;
 title  = {{TITLE}},&lt;br /&gt;
 school = {{SCHOOL}},	&lt;br /&gt;
 year   = {{YEAR}},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Web Links &amp;lt;/h2&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@MISC{ALIAS,&lt;br /&gt;
 author       = {{AUTHOR}},&lt;br /&gt;
 title        = {{TITLE}},&lt;br /&gt;
 howpublished = {\url{LINK}},&lt;br /&gt;
 year         = {{YEAR}},&lt;br /&gt;
 note         = {[Online; accessed DATE]}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; TikZ &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some problems have been reported when compiling  TikZ with TexLive 2009.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation Problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
Whether compiling you get: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
I can't  find file tikzlibrary&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it is possible you have problems with TexLive and  need to install  new TexLive version.&lt;br /&gt;
&lt;br /&gt;
Download TexLive 2011 image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://ftp.oleane.net/pub/CTAN/systems/texlive/Images/texlive2011.iso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the .iso image as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount -o loop -t iso9660 texlive2011.iso /media/cdrom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install TexLive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./install-tl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Options -&amp;gt; Create SymLinks -&amp;gt; [Chose Standar Dirs]&lt;br /&gt;
Install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compilation works, but not pictures shown &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get last pgf package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://downloads.sourceforge.net/project/pgf/pgf/version%202.10/ \&lt;br /&gt;
  pgf_2.10.tds.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpgf%2F&amp;amp;ts= \&lt;br /&gt;
  1338847489&amp;amp;use_mirror=netcologne&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded file.&lt;br /&gt;
Substitute the old pgp package by the new downloaded one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mv tex/generic/pgf/* /usr/share/texmf/tex/generic/pgf/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Execute as superuser:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
texhash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; DVI problems &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dvipdfm does not completelly supports tikz options.&lt;br /&gt;
Modify it by dvipdfmx&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Videos on Beamer &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [[media:videoLatexTemplate.tgz | videoLatexTemplate.tgz]] there is an example with two different options to include videos on beamer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The first one inserts the video on the pdf.&lt;br /&gt;
There is a &amp;lt;i&amp;gt;video2image.sh&amp;lt;/i&amp;gt; script that converts a video into different frames (.EPS).&lt;br /&gt;
It requires ffmpeg and sam2p.&lt;br /&gt;
&lt;br /&gt;
Later on &amp;lt;i&amp;gt; animategraphics &amp;lt;/i&amp;gt; is in charge of moving the frames:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\animategraphics[autoplay,loop,width=6cm]{&amp;lt;NUM_FRAME&amp;gt;{mov/&amp;lt;VIDEO_FOLDER&amp;gt;}{&amp;lt;FIRST_FRAME&amp;gt;}{&amp;lt;LAST_FRAME&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
The second one inserts an image that one pressed launches a player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\movie[externalviewer]{\includegraphics[width=0.5cm]{figs/&amp;lt;FIG_ICON&amp;gt;}}{mov/&amp;lt;VIDEO_FILE&amp;gt;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile you need to run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make videos&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Memory size limit &amp;lt;/h1&amp;gt;&lt;br /&gt;
If you get something like this: TeX capacity exceeded, sorry [main memory size=5000000].&lt;br /&gt;
&lt;br /&gt;
Run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kpsewhich texmf.cnf &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit, the file that it outputs regardless it says not to touch&lt;br /&gt;
&lt;br /&gt;
Add the follwing line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main_memory = 8000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you need to update the system:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fmtutil-sys --all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, it should work&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=Novint_Falcon&amp;diff=2047</id>
		<title>Novint Falcon</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=Novint_Falcon&amp;diff=2047"/>
				<updated>2023-06-01T17:54:57Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuration  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; User permits &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to allow a standard user to control the Novint Falcon, some rules must be updated.&lt;br /&gt;
&lt;br /&gt;
Download [[http://www.robolabo.etsit.upm.es/wikiFiles/51-forcedimension.rules &amp;lt;i&amp;gt;51-forcedimension.rules&amp;lt;/i&amp;gt;]] file and copy it to /etc/udev/rules.d.&lt;br /&gt;
&lt;br /&gt;
Reload the rules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo udevadm control --reload-rules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once plugged, Novint Falcon is attached to the &amp;lt;i&amp;gt; plugdev &amp;lt;/i&amp;gt; group, so the user must be a member of this group.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Edit &amp;lt;i&amp;gt; /etc/group &amp;lt;/i&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Find the line that corresponds to &amp;lt;i&amp;gt; plugdev &amp;lt;/i&amp;gt; group.&lt;br /&gt;
&amp;lt;li&amp;gt; Add the user name to the group (e.g. plugdev:x:46:user1), where &amp;lt;i&amp;gt; user1 &amp;lt;/i&amp;gt; is your user name.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	<entry>
		<id>https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2046</id>
		<title>PhantomX Reactor Robot</title>
		<link rel="alternate" type="text/html" href="https://wiki.robolabo.etsit.upm.es/index.php?title=PhantomX_Reactor_Robot&amp;diff=2046"/>
				<updated>2023-06-01T17:53:53Z</updated>
		
		<summary type="html">&lt;p&gt;Aguti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note: &amp;lt;/b&amp;gt; Most of the information of this website is obtained from: http://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduino-ide-1-6-x-setup.html&lt;br /&gt;
Please refer to the previuos link if you need more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Configuring the environment  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Setting up the Arduino Software &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the Arduino IDE according to your operating system from: https://www.arduino.cc/en/Main/Software . &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Install the Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the installer, run the installer and install the software in a path of your convenience. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If you have chosen to download the sources (Linux or zip on Windows), uncompress the software in a path of your convenience &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE, so it will create all the folders needed&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Installing Tools and Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Download the robot libraries from: [[http://www.robolabo.etsit.upm.es/wikiFiles/Arbotix-arduino-1-6.zip here ]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Uncompress the libraries to a path of your convenience. In this file you will find two folders: &amp;lt;b&amp;gt; hardware &amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt; libraries &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Copy both folders to the &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;. In some Windows you will find this folder in &amp;lt;i&amp;gt; My Documents\Arduino\ &amp;lt;/i&amp;gt;, while in others you will find it in &amp;lt;i&amp;gt; Documents\Arduino\ &amp;lt;/i&amp;gt;.&lt;br /&gt;
In Linux you will find this folder in &amp;lt;i&amp;gt;~/Arduino/&amp;lt;/i&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: &amp;lt;/b&amp;gt; If you already have a &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder inside your &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;, move the content of the &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder downloaded inside the &amp;lt;i&amp;gt;libraries&amp;lt;/i&amp;gt; folder of &amp;lt;ARDUINO_MAIN_DIRECTORY&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Check installation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open/run Arduino IDE &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a Robot Test: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
File -&amp;gt; Examples --&amp;gt;ArbotiX --&amp;gt; Tests --&amp;gt; ReactorTest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is no errors, you are ready for the next step.&lt;br /&gt;
If you found some errors, please review the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Close Arduino IDE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Installing FTDI drivers &amp;lt;/h3&amp;gt;&lt;br /&gt;
If you are using Linux or Mac, skip this step.&lt;br /&gt;
If you are using Windows, power up the robot and connect it to your computer.&lt;br /&gt;
Windows should ask you to install some FTDI drivers to be able to connect to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Hello World example  &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a helloWorld example to test the communication with the robot.&lt;br /&gt;
Please download it from [[http://www.robolabo.etsit.upm.es/wikiFiles/ROB-HelloWorldPhantomReactor.tgz here ]] in your prefered destination.&lt;br /&gt;
Untar the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xvzf helloWorld.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Compiling the code &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open Arduino IDE and load the .ino file in your environment: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File --&amp;gt; Open --&amp;gt; &amp;lt;HELLOWORLD_EXAMPLE&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Select the Arbotix board: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools -&amp;gt; Board -&amp;gt; ArbotiX Std&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Compile the program: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program-&amp;gt; Verify/Compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Downloading the code to the robot &amp;lt;/h2&amp;gt;&lt;br /&gt;
Once compiled, select the correct por to download the binaries:&lt;br /&gt;
In Linux, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; /dev/ttyUSBX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows, typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tools -&amp;gt; Port -&amp;gt; COMX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where X depends on your system and the number of peripherals on it&lt;br /&gt;
&lt;br /&gt;
Upload your code to the board:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program -&amp;gt; Upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IDE will notify that it is &amp;lt;i&amp;gt; uploading &amp;lt;/i&amp;gt; and after some seconds it will say &amp;lt;i&amp;gt; uploaded &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Playing with HelloWorld &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example allows you to move different joints of the robot.&lt;br /&gt;
&lt;br /&gt;
Once the code have been loaded, you can open the serial port:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tools --&amp;gt; Serial Monitor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select 115200 bauds. This is the speed selected on the code for communicating with the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; Select &amp;quot;No line ending&amp;quot;. To avoid sending a line end after entering commnds.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some seconds you should see the board communicating the following menu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
################################&lt;br /&gt;
Serial Communication Established&lt;br /&gt;
################################&lt;br /&gt;
################################&lt;br /&gt;
Please enter option 1-6&lt;br /&gt;
0) Relax Servos&lt;br /&gt;
1) Hold Servos&lt;br /&gt;
2) Get Joints Pos&lt;br /&gt;
3) Gripper Close&lt;br /&gt;
4) Gripper Open&lt;br /&gt;
5) TestAllJoints&lt;br /&gt;
6) MoveSpecificJoint&lt;br /&gt;
################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the different options:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 0 &amp;lt;/b&amp;gt; unpowers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 1 &amp;lt;/b&amp;gt; powers the servomotors of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 2 &amp;lt;/b&amp;gt; prints the position of every generalized coordinate (Base, Shoulder, Elbow, Wrist and Wrist rotation).&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 3 &amp;lt;/b&amp;gt; closes the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 4 &amp;lt;/b&amp;gt; opens the gripper.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 5 &amp;lt;/b&amp;gt; provides a test movement for the complete robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; Option 6 &amp;lt;/b&amp;gt; allows to move specific joints. In this case, once the option is selected, the following menu will appear:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Base: 0&lt;br /&gt;
Shoulder: 1&lt;br /&gt;
Elbow: 2&lt;br /&gt;
Wrist: 3&lt;br /&gt;
Wrist Rot: 4&lt;br /&gt;
&lt;br /&gt;
Joint to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user must choose one of the 5 options, which correspond to different joints.&lt;br /&gt;
&lt;br /&gt;
For every joint, once selected, the program will ask for a position to move, given the limits of the joint, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joint selected: 1&lt;br /&gt;
Shoulder: [-0.33, 2.97]&lt;br /&gt;
Position to move?: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the position is provided through the serial port it will return all the information inserted, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Moving Joint: 1 to position: 1.57&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will move to the specified position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; Practice Template &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the implementation of the Practice of the &amp;quot;Control and Robotics in Medicine&amp;quot; subject of the &amp;quot;Master on Bioengineering&amp;quot;  of the UPM, we have created a students template.&lt;br /&gt;
You can download the template from [[http://www.robolabo.etsit.upm.es/wikiFiles/ROB-P1Template.tgz here ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Structure &amp;lt;/h2&amp;gt; &lt;br /&gt;
The template has 4 different files:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; poses.h &amp;lt;/b&amp;gt;: A file where different generalized coordinates can be stored.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; servos.h &amp;lt;/b&amp;gt;: A library to manage the servomotors independently.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; robot.h &amp;lt;/b&amp;gt;: A library to manage the different joints of the robot.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; P1-Template.h &amp;lt;/b&amp;gt;: The place where the practice should be developped.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Libraries &amp;lt;/h2&amp;gt;&lt;br /&gt;
This Section provides important information for the resolution of Practice1.&lt;br /&gt;
It is based on the explanation of different methods to control the robot, but it does not explain the complete set of methods.&lt;br /&gt;
To get and exahustive description of all methods the &amp;lt;i&amp;gt; servos.h &amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; files must be studied.&lt;br /&gt;
&lt;br /&gt;
In principle, all interaction with the robot will be made by means of the &amp;lt;i&amp;gt; robot.h &amp;lt;/i&amp;gt; library.&lt;br /&gt;
Main methors are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperOpen(void) &amp;lt;/b&amp;gt;: It opens the gripper, so it can release an object if already grasped.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_GripperClose(void) &amp;lt;/b&amp;gt;: It close the gripper, so it can grasp an object if correctly located.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetSingleTrajectory ( double *f_pos, uint16_t un_time, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform: Linear (LINEAR = 0)  or Cubic  (CUBIC1 = 1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt; taking 2 seconds with a linear function, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 2000, LINEAR);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I we want to move the robot to the same coordinates but in 10 secons with a cubic function, we need to execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetSingleTrajectory (m_fCoordTest, 10000, CUBIC1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; void ROBOT_SetDoubleTrajectory ( double *un_pos1, double *un_pos2, uint16_t un_time1, uint16_t un_time2, uint8_t un_trajectory_type ) &amp;lt;/b&amp;gt;: &lt;br /&gt;
It performs a trajectory form one point (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to another point (Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;)) passing by a point (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)).&lt;br /&gt;
&lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;), Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) and Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) are defined as generalized coordinates Q={q&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;,q&amp;lt;sub&amp;gt;5&amp;lt;/sub&amp;gt;}.&lt;br /&gt;
Moreover, Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;) is defined as the coordinates at which the robot is located once the instruction is set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos1 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt; , for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double m_fCoordTest[]       = {0,M_PI/2,-M_PI/2,0,0};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt;double *f_pos2 &amp;lt;/b&amp;gt;: &lt;br /&gt;
Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;) is coded as &amp;lt;i&amp;gt; double * &amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time1 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint16_t un_time2 &amp;lt;/b&amp;gt;,  represents the time that it takes to travel from  (Q(t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;)) to Q(t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;),that is: t&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; - t&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; in milliseconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;lt;b&amp;gt; uint8_t un_trajectory_type &amp;lt;/b&amp;gt;, represents the type of trajectory to perform. Only cubic trajectories are allowed  (CUBIC2 = 2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, if we want to move the robot for the actual position to position &amp;lt;i&amp;gt; m_fCoordTest &amp;lt;/i&amp;gt;  taking 5 seconds passing by &amp;lt;i&amp;gt; m_fCoordVia &amp;lt;/i&amp;gt; with 2 seconds from the start, we need to execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ROBOT_SetDoubleTrajectory (m_fCoordVia, m_fCoordTest, 2000, 3000, CUBIC2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt; Implementation &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt;  follows the same structure as the helloWorld.ino example.&lt;br /&gt;
However, a new option has been included in the menu (Opcion A).&lt;br /&gt;
This option calls the &amp;lt;i&amp;gt; P1Solution &amp;lt;/i&amp;gt; method.&lt;br /&gt;
If you open &amp;lt;i&amp;gt; P1-Template.ino &amp;lt;/i&amp;gt; and go to the end of the file, you will see the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void P1Solution ( void )&lt;br /&gt;
{&lt;br /&gt;
  /* START CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
&lt;br /&gt;
  /* END CODE TO BE IMPLEMENTED BY THE STUDENTS */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is between those comments where you must implement all functions required to achive the task.&lt;br /&gt;
Remember you may need some &amp;lt;i&amp;gt; delay &amp;lt;/i&amp;gt; instructions, defined as &amp;lt;i&amp;gt; void delay (uint16_t millisec) &amp;lt;/i&amp;gt;, to prevent some instructions to execute before you need them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Moreover, in the &amp;lt;i&amp;gt; poses.h &amp;lt;/i&amp;gt; file you can find some examples of how to define the generalized coordinates of your system.&lt;/div&gt;</summary>
		<author><name>Aguti</name></author>	</entry>

	</feed>