Professional Documents
Culture Documents
MÉRIDA
TEAM MEMBERS
BARAJAS LLANES ANDREA GUADALUPE
ENCALADA SALAZAR ALEJANDRO JOSÉ
MEDINA GAMBOA HUMBERTO ANDRÉS
PECH MAY FRANCISCO GEOVANNY
PÉREZ RUÍZ ISMAEL ELIEZER
VALLADARES PÉREZ JOSÉ HUMBERTO
PROFESSOR
MCI. JOEL SÁNCHEZ PAZ
DATE
3/DECEMBRE/2013
CA2+. Calcium
EOG. Electrooculography
EEG. Electroencephalography
V. Volts
This paper shows the development of a prototype that attends to people with mobility
disabilities, such as quadriplegics or spastic paralysis patients.
This technique allows detection of eye movements based on recording the potential
difference between the cornea and the retina, these property is used in the project to control
the movement of the mouse cursor in a precise manner on the computer screen. The
prototype is a compact design powered with a voltage that goes from -9V to 9V. This voltage
is provided by batteries.
The use of those devices as well as conventional electrodes made a product with a
relatively low cost as proposed in other jobs.
The motor disability is a condition that has increased considerably. Just in Mexico,
sources of Instituto Nacional de Estadística y Geografía (INEGI) say that about 5% of the
population has a disability of some kind, of which 58% is motor disability. The origin and
nature of such diseases are multiple, but in most cases mental activity and functionality of
the individual's eyes remain intact, the latter being an excellent resource that can enable the
disabled person to continue interacting with their environment by performing practically
normal activities.
There are currently several studies dedicated to the developing of various prototypes
using the electrical signals generated in the eyes movement and obtained by EOG to control
different objects like wheelchair, robotic arms, GUIs assistance to disabled, cursor and
computer keyboard (Rosas-Cholula, Ramírez Cortés, Escamilla Ambrosio & Alarcón
Aquino, 2011)
(Caballero Gaviria, et al., 2011), proposed a human computer interface based on EOG
and consisting of four stages: signal acquisition, filters, amplifiers and pattern recognition
and generating control signals, the prototype uses mixed-signal circuits, which reduces the
number of components thereof, however is only focused on the vertical and horizontal
movements of the cursor.
Before going further, it’s important to know the physiology of the systems involved to
achieve the best recording for the EOG signal. For this project mainly the muscular and
nervous system are involved. Nervous system is divided into two parts, the central nervous
system and peripheral nervous system.
Muscular system
The muscular system consists of the set of skeletal muscles, whose mission is the
body movement. Both muscles and bones constitute the musculoskeletal system, which is
the active part, because the muscles are responsible for the movement of bones.
Axial skeleton: it is composed of the bones of the head, neck and trunk. Protects vital
organs, in this the appendicular skeleton is articulated and in total there are 8 bones.
Appendicular skeleton: it is composed of the bones of the limbs. It is the most mobile
part of the body, and is made of 126 bones
Skeletal muscles are composed of striated muscle fibers that are organized as follows:
Muscle contraction requires an input of energy obtained from high-energy bonds of ATP.
Nervous system
The nervous system, along with the endocrine system integrates and controls the many
functions that allow men to regulate its internal environment and react to its external
environment or to address it. The functional unit of the nervous system is a neuron,
consisting of a body containing the cell nucleus, the metabolic machinery in dendrites to
receive stimuli, and an axon that transmits stimuli to other cells. The nervous system is
divided into two parts: the central nervous system and peripheral nervous system.
The central nervous system consists of the brain and spinal cord. It is protected by three
layers: dura (outer membrane), arachnoid mater (middle), pia mater (inner membrane); also
called meninges. In addition, the brain and spinal cord are protected by bone casings, which
are the skull and spine respectively. This is a very complex system, since it is responsible
for perceiving stimuli from the outside world and to transmit impulses muscles and nerves.
The cavities of these bodies (ventricles in the case of the brain and ependymal duct in the
case of the spinal cord) are filled with a clear, colorless liquid, which is called cerebrospinal
fluid. Its functions are varied: it serves as a medium of exchange of certain substances, as
The cells forming the central nervous system are arranged such that two formations
lead to very characteristics: gray matter, consisting of the soma and dendrites of neurons,
in addition to amylenic fibers; and white matter, formed mainly by myelinated nerve
processes (axons), whose function is to drive the information, in addition to myelinated fibers
are what give it that color showing.
In short, all animals whose body has a central nervous system are provided with neural
mechanisms responsible for receiving and processing the sensations gathered by the
receptor organs of the different senses and transmit orders answer accurately to various
effector organs.
This section of the nervous system consists of nerves and neurons that reside or extend
outside the central nervous system (CNS), to the limbs and organs. The main function of
SNP is to connect the central nervous system (CNS) to the limbs and organs. The difference
between this and the CNS is in the peripheral nervous system which is not protected by
bone or blood-brain barrier, allowing atoxins exposure and mechanical damage. The
peripheral nervous system is thus the coordinates, regulates and integrates our internal
organs, through involuntary responses.
It consists of 12 pairs of cranial nerves and 31 pairs of spinal nerves. In the peripheral
nervous system (PNS) Schwann cells help guide the growth of axons and regeneration of
injuries.
Spinal nerves, which are those that send sensory information (touch, pain) of the
trunk and limbs to the central nervous system through the spinal cord. They also
send position information and status of the muscles and joints of the trunk and limbs
through the spinal cord. Receive motor commands from the spinal cord to control
skeletal muscle. There are a total of 31 pairs of nerves, 4 each with two parts or
roots: a sensitive and a motor.
The motor part is what carries impulses from the spinal cord to the corresponding effectors.
Always have to take into account the spinal nerves.
Cranial nerves that send sensory information from the neck and head toward the
central nervous system. Receive motor commands to control the skeletal muscles
of the neck and head; and are 12 pairs of cranial nerves.
Regulates all body functions, controls smooth muscle, heart, guts and glands by order
of the central nervous system.
The biopotentials have been used for applications where is needed a system that could
be able to measure and process physiological signals that cause the muscles during the
contraction and relaxation of these. Then, people with disabilities who find it impossible
interact with electronic devices may have a solution or an instrument to manipulate or use
these electronic devices. These biopotentials are obtained and applied for many purposes,
such as controlling the direction in which a wheelchair carriage until now can be controlled
in artificial prostheses with signals obtained from the brain moves.
One of these biopotentials used are those generated by the muscles of the eye. The
EOG has been used to design interfaces for people with disabilities that only allow them to
move their eyes. Gips et al. (1994), the Boston College in the United States, developed a
system called Eagle Eyes, also based on Electrooculography (EOG) to control a computer
mouse pointer. The system performs a spatial location in an x-y plane based on the electrical
potential on the eyes. The system is now used in many schools and libraries in the United
States. [8]
The EOG technique used in this paper is a method that can detect eye movements and
is based on recording the potential difference between the cornea and the retina. The
corneal-retinal potential is produced by hyperpolarization and depolarization of nerve cells
in the retina. The set (cornea-retina) forms a dipole in the previous-posterior axis direction:
positive on the corneal zone and negative on the retinal zone. [6 and 11]
With this antecedent, the tools necessary to know the correct way to measure the
potential generated by muscles that cause muscle movements have been acquired.
What makes this system different to the existing ones is the ability to detect the eyes
flickering. With this, five different signals can be obtained from the measurement. This make
possible to perform more functions than the existing devices.
One of the main obstacles was the EOG biopotential recording. Like most biological
potentials, eye potential needs to be recorded by the best way possible in order to then be
amplified and subsequently filtering to remove the noise signals that may affect the
characteristic signal. Documental investigation on this problem made possible to build a
system able to offer a clean, defined signal.
In (Merino et al., 2010) an algorithm for signal processing EOG was proposed. This
device uses as inputs the derivative and the amplitude level of the signal. The derivative is
used to detect the edges of the signals and the amplitude level to filter noise. Even when
the algorithm shows high expectations, the article does not concludes with a final
implementation.
The previously exposed researches provided the necessary information for the
developing of the amplification and filtering section on this project. Also, the knowledge
obtained with this researches made possible to improve the proposed filtering units and thus,
a cleaner and better signal.
The EOG signal can be easily obtained by putting a couple of electrodes near of the
eyes, and a reference electrode as shown in Figure 2. Thus, two channels are needed, one
for the vertical movement and one for the vertical movement. According to previous studies,
EOG signals amplitude is between 5uV and 20 uV per grade with a bandwidth form 0 Hz to
30 Hz.(Singh & Singh, 2012), (Brown, Marmor, Vaegan, Brigell & Brach, 2006). The ideal
EOG wave is shown on figure 3.
Figure 4 shows the block diagram that will be used on this project. The block diagram
is divided in three different sections: 1) Amplification and filtering 2) Analog to digital
Conversion and 3) Computer communication and voltage source.
For this purpose, AD620, an instrumentation amplifier, was used. It was chosen
because of its common mode rejection, and low cost in comparison to other amps. A trim
pot was used to vary the gain of the amplifier. That was because the gain of EOG signal
changes from person to person, and is necessary to suit this parameter to the needs of the
patient. Figure below shows the diagram of the AD620.
For the filtering section, only was used an eight order low-pass filter. It was designed
with the software Filter Pro ® to make the design simpler. For this it was used the
Butterworth approximation, because it provides the circuit a more stable frequency
response. Sallen-Key topology was chosen in order to improve the stability of the system.
The cut frequency of the filter was stablished on 16 Hz. This was made in order to enhance
the noise reduction of the filter, to obtain a cleaner signal. It was designed with a lower
frequency than the exposed in the previous sections because real filters has a margin of
error due to the inaccuracy on the values proposed and the tolerance of the components. It
was necessary to consider this factor in order to obtain a better recording of the signal and
avoid problems with the posterior digital processing. Figure below shows the components
used for the filter design.
Figure 7 also shows the Bode diagram. This represents the frequency response of
the filter. The graph shows that even when the cutoff frequency is stablished in 16 Hz, filter
doesn´t cut exactly on this frequency. Instead of this, there is a progressive decrement on
the gain on the signal from that frequency.
Stability
To check the stability of the system, poles and zeros tool was implemented. The
system consists in a low pass filter 8th order, therefore, for analysis can be separated into
4 low pass filter Sallen Key topology second order. Function below shows the generic function
for an active second order low-pass filter.
𝐾
𝐻(𝑠) =
𝑅1 𝐶1 𝑅2 𝐶2 𝑠 2 + [(1 − 𝐾)𝑅1 𝐶1 + 𝑅1 𝐶2 + 𝑅2 𝐶2 ]𝑠 + 1
DAQ
Microcontroller Arduino was used to digitalize data obtained by the amplification and
filtering block. It was necessary to configure some libraries to the software LabView to make
possible the communication between LabView and the microcontroller and, with this, the
analog to digital conversion.
Interface
USB protocol was used in order to stablish the communication between PC and
Arduino.
Programming enviroment
For Data acquisition it was necessary the implementation of a library called “LabView
Interface for Arduino” (LIFA), designed by National Instruments. This library allows the user
to implement Arduino as a DAQ, as described on previous sections.
In order to use Arduino as a DAQ, it’s necessary to write the code given by LIFA on
the microcontroller. This code, shown on the Annex section, allows NI-VISE to recognize
the device as a valid DAQ.
Figure 8 shows the tools for this operation. The block “INIT” enables the
communication between Arduino and PC. Some configurations such as baud rate, port ID,
size of packets and the model of Arduino must be set in order to perform this communication.
The block “CLOSE” ends the communication between the device and LabView. USB
protocol is used to this purpose, as mentioned on previous sections.
Microcontroller both analog and digital ports. The block “LOW LEVEL” allows to
manage the writing and reading of this ports.
The block “SENSOR” contains the different settings for the reading of the information
given by the sensors. It also contains the structures to manage actuators, step-by-step
motors and servo motors.
The block “UTILITY” contains the tools to design specific algorithms and the block
“EXAMPLES” provides the user some examples of these functions.
I. EOG signals reading: Samples are reading at the sample frequency defined by
user.
II. Calibration: The Electrooculographic offset signal has levels variants from
person to person, coupled with this, amplification, not only amplifies the signal
itself, but also amplifies the level of offset. At this stage the level sought eliminate
offset digitally in order to have a positive voltage and a negative voltage to the
fixings of the thresholds and thus optimize the evaluation of cases. You will also
would provide a gain to the signal acquired for better handling.
IV. Actuator: The actuator for this project, is given by the mouse pointer. This
section uses the number given by the previous section to move the mouse
according to the table shown below.
Indicator Mouse movement
0 Without motion
1 Right
2 Up
3 Left
4 Down
5 Right-up
6 Left-down
7 Left up
8 Rigth down
Table 2. Replies of actuador
In order to use this block is necessary to stablish the in settings. This is possible by
pressing double click on the block. Figure below shows the window for this operation.
The image below shows the window “Parameters” where the in and out parameters
can be set. Section “Functionprotype” shows (in parenthesis) the in and out variables of the
function. To enable the usage of the function is necessary to stablish this variables. The
section “Currentparameter” allows the user to declare the variables used in the function. It’s
important to maintain exactly the same name than shown in the section “Functionprototype”
in order to obtain the correct values for the block.
Stability
Figure 12 shows the four section in which the filter is divided. Then the transference
function for each section is obtained.
𝐾
𝐻1 (𝑠) =
𝑅1 𝐶1 𝑅2 𝐶2 𝑠 2 + [(1 − 𝐾)𝑅1 𝐶1 + 𝑅1 𝐶2 + 𝑅2 𝐶2 ]𝑠 + 1
K=1
R1= 200 KΩ
R2=680 KΩ
C1= 22nF
C2= 33nF
𝐻1 (𝑠)
1
=
(200𝐾𝛺)(22𝑛𝐹)(33𝑛𝐹)(680𝐾𝛺)𝑠 2 + [(1 − 1)(200𝐾𝛺)(22𝑛𝐹) + (200𝐾𝛺)(33𝑛𝐹) + (680𝐾𝛺)(33𝑛𝐹)]𝑠 + 1
1
𝐻1 (𝑠) =
1.086086 ∗ 10−4 𝑠 2 + 0.02904𝑠 + 1
𝐾
𝐻2 (𝑠) =
𝑅1 𝐶1 𝑅2 𝐶2 𝑠2 + [(1 − 𝐾)𝑅1 𝐶1 + 𝑅1 𝐶2 + 𝑅2 𝐶2 ]𝑠 + 1
R1=300 KΩ
R2=430 KΩ
C1=22 nF
C2=33 nF
𝐻2 (𝑠)
1
=
(300𝐾𝛺)(22𝑛𝐹)(33𝑛𝐹)(430𝐾𝛺)𝑠 2 + [(1 − 1)(300𝐾𝛺)(22𝑛𝐹) + (300𝐾𝛺)(33𝑛𝐹) + (430𝐾𝛺)(33𝑛𝐹)]𝑠 + 1
1
𝐻2 (𝑠) =
9.3654 ∗ 10−5 𝑠 2+ 0.02409𝑠 + 1
𝐾
𝐻3 (𝑠) =
𝑅1 𝐶1 𝑅2 𝐶2 𝑠2 + [(1 − 𝐾)𝑅1 𝐶1 + 𝑅1 𝐶2 + 𝑅2 𝐶2 ]𝑠 + 1
K=1
R1=470 KΩ
R2=620 KΩ
C1=10 nF
C2= 33 nF
𝐻3 (𝑠)
1
=
(470𝐾𝛺)(10𝑛𝐹)(33𝑛𝐹)(620𝐾𝛺)𝑠 2 + [(1 − 1)(470𝐾𝛺)(10𝑛𝐹) + (470𝐾𝛺)(33𝑛𝐹) + (620𝐾𝛺)(33𝑛𝐹)]𝑠 + 1
1
𝐻3 (𝑠) =
9.6162 ∗ 10−5 𝑠 2+ 0.03597𝑠 + 1
𝐾
𝐻4 (𝑠) =
𝑅1 𝐶1 𝑅2 𝐶2 𝑠2 + [(1 − 𝐾)𝑅1 𝐶1 + 𝑅1 𝐶2 + 𝑅2 𝐶2 ]𝑠 + 1
R1= 110 KΩ
R2=270 KΩ
C1=10 nF
C2=330 nF
𝐻4 (𝑠)
1
=
(110𝐾𝛺)(10𝑛𝐹)(330𝑛𝐹)(270𝐾𝛺)𝑠 2 + [(1 − 1)(110𝐾𝛺)(10𝑛𝐹) + (110𝐾𝛺)(330𝑛𝐹) + (270𝐾𝛺)(330𝑛𝐹)]𝑠 +
1
𝐻4 (𝑠) =
9.801 ∗ 10−5 𝑠 2+ 0.1254𝑠 + 1
To find the transference functions it was necessary to multiply the functions obtained
1 1
𝐻5 (𝑠) = ( −4 2
)( −5 2
)
1.086086 ∗ 10 𝑠 + 0.02904𝑠 + 1 9.3654 ∗ 10 𝑠 + 0.02409𝑠 + 1
1
𝐻5 (𝑠) = ( )
1.01716298244𝑒 −8 𝑠 4 + 5.336093334𝑒 −6 𝑠 3 + 9.018362𝑒 −4 𝑠 2 + 5.313𝑒 −2 𝑠 + 1
1 1
𝐻6 (𝑠) = ( −5 2
)( −5 2
)
9.6162 ∗ 10 𝑠 + 0.03597𝑠 + 1 9.801 ∗ 10 𝑠 + 0.1254𝑠 + 1
1
𝐻6 (𝑠) = ( )
9.42483762𝑒 𝑠 + 1.55841345𝑒 𝑠 3 + 4.70481𝑒 −3 𝑠 2 + 1.6137𝑒 −1 𝑠 + 1
−9 4 −5
𝐻(𝑠)
1
=( )
1.01716298244𝑒 −8 𝑠 4 + 5.336093334𝑒 −6 𝑠 3 + 9.018362𝑒 −4 𝑠 2 + 5.313𝑒 −2 𝑠 + 1
1
∗( )
9.42483762𝑒 𝑠 + 1.55841345𝑒 𝑠 3 + 4.70481𝑒 −3 𝑠 2 + 1.6137𝑒 −1 𝑠 + 1
−9 4 −5
+5.9516348862135𝑒 −6 𝑠 4 + 4.16416090724𝑒 −4 𝑠 3
( +1.41802343𝑒 −2 𝑠 2 + 2.145𝑒 −1 s + 1 )
Image below shows the poles and zeros graph obtained with the transference
function. As is shown, there are no poles on the right side of the graph, so, it’s possible to
say the system is stable. This result is only possible when there no a unitary feedback
If a unitary feedback is added the location of poles changes. With this, also the system
stability changes, producing an unstable system, as shown in figure below.
Filters
During the procedure previously described, it was possible to obtain, amplify and
filter the EOG signal obtained through the electrodes. This signals represent the different
movements that the eye can do: up, down, left and right. Also it was possible to record
the eye flickering. Images below show the comparison between the amplified signal and
the filtered one.
Figure 16. Signal obtained from the upward movement and the downward movement
immediately
Digital results
The following image shows the interface that allows the user to interpret the
information that throws the system. The module settings to visualize how the system is. The
two existing modes are the normal mode and the mode EOG. In normal mode the mouse
can be manipulated with either the touchpad or a conventional mouse. In the EOG so the
mouse can only be controlled by Electrooculography signal. The mouse direction to visualize
the direction in which the mouse is moving in the EOG mode.
I. SIGNAL READING
Signal reading was implemented through the connection of the blocks “INIT” and
“CLOSE” put outside the “WHILE” cycle. For this, it was necessary the usage of the block
“ANALOG READ.” Two of this blocks was used for this section, one for the X axis (right and
left movements) and one for the Y axis (up and down movements).
1. Pressing a button, the case will receive a true value, thus a series of samples of the
signal to the signal from the X axis and Y axis is take 1000 samples were taken, then
is the sum of these and is averaged in a thousand to get the average value of the
offset signal having then this value is returned as a double variable. This block can
be seen in the following figure:
In the next image can be displayed reduced so the calibration step. Each box
represents a subvi. The section marked with the number 1 and number 2 show the detailed
processes in subsection b, respectively, described above.
The next image shows the evaluation stage of the cases, which was implemented with
a subvi.
IV. ACTUATOR.
The next figure shows the stage of the actuator by implementing a subvi. The bottom,
can be represented through a button, the action being undertaken by the mouse. It
serves as an indicator.
Figure 27 shows the block diagram of the Actuator section. The “CASE” block represents
the table previously shown. Function “CALL,” after the “CASE” function, allows the
movement of the mouse pointer. Two feedback loops were added in order to keep the
position of the mouse pointer. Also, initial conditions set the pointer at the center of the
display, considering a display of 1366 x 768 pixels.
Throughout the development of the work other problems arose. The first of these was
the way how to enter the Electrooculographic signal to the computer, since the documents
consulted for this work, income from pulse to an electromechanical mouse set. However this
creates many problems due to bearing system and pulses recorded in a mouse; so the
implementation of an interface was necessary with greater ease of use. To this was resorted
to various tools foregoing as the Arduino microcontroller, the LabView software, and some
own libraries Windows operating system. With this we can say that the system proposed in
this paper was more efficient and easy to procesas than earlier, which is an advantage.
In the area of filtering and amplification, various problems due to the variability in the
signal presented person to person. This results in a large variability in the amplitude of the
signal producing saturation of the operational amplifiers and baseline shift. These two, with
main problems, which must be solved to facilitate digital signal processing. The documents
consulted in the preparation of this project did not have a solution to these problems and in
many cases were not mentioned. In the case of the amplitude, a precision potentiometer
was placed on the AD620 amplifier stage, this allowed to vary the gain saturation point where
the signal is produced. In the case of the baseline, a potentiometer is used in the output of
the filtering step to vary the baseline, since if this is moved above the 5 V, the converter will
read it as a saturation, and only will display the measurement of 5 V. If the baseline remains
negative, the microcontroller will not be able to read the data. The above was an
improvement at this stage with respect to other works, could be obtained as a means of
calibration of the signal obtained.
Added to this, the cutoff frequency of 30 Hz was reduced to 16 Hz, which improved noise
rejection signal. Note that it could not remove the DC component of the signal, because this
variation is what gives rise to the signal.
In future work the improvement mainly be sought in the form of taking the signal. This
will require the use of other electrodes representing greater comfort for the patient and better
fixation and duration for taking signal. It will also be necessary to improve the shape of signal
calibration for better digital processing and better results.
Anexo 1
/**************************************************************************
/*******************************************************************************
** Includes.
********************************************************************************
#include<Wire.h>
#include<SPI.h>
#include<Servo.h>
#include "LabVIEWInterface.h"
/*******************************************************************************
** setup()
** Input: None
** Output: None
********************************************************************************
voidsetup()
syncLV();
/*********************************************************************************
loop()
** Input: None
** Output: None
********************************************************************************void loop()
checkForCommand();
// Place your custom loop code here (this may slow down communication with LabVIEW)
if(acqMode==1)
sampleContinously();
/******************************************************************************
** This File May Be Modified And Re-Distributed Freely. Original File Content
********************************************************************************
/*******************************************************************************
** Define Constants
#define FIRMWARE_MAJOR 02
#define FIRMWARE_MINOR 00
#define DEFAULTBAUDRATE 9600 // Defines The Default Serial Baud Rate (This must
match the baud rate specifid in LabVIEW)
#else
#endif
// Declare Variables
floatcontAcqSpeed;
floatacquisitionPeriod;
floatiterationsFlt;
int iterations;
floatdelayTime;
/******************************************************************************
** syncLV
** Synchronizes with LabVIEW and sends info about the board and firmware
(Unimplemented)
** Input: None
********************************************************************************
voidsyncLV();
/*******************************************************************************
** setMode
** Output: None
********************************************************************************
voidsetMode(int mode);
/******************************************************************************
** checkForCommand
** Checks for new commands from LabVIEW and processes them if any exist
** Input: None
** 0 - No new command
********************************************************************************
intcheckForCommand(void);
/******************************************************************************
** processCommand
** 0 - No new command
*******************************************************************************
/******************************************************************************
** writeDigitalPort
** Output: None
********************************************************************************
/******************************************************************************
** analogReadPort
** Reads all 6 analog input ports, builds 8 byte packet, send via RS232.
** Input: None
** Output: None
********************************************************************************
voidanalogReadPort();
/******************************************************************************
** sevenSegment_Config
** Configure digital I/O pins to use for seven segment display. Pins are stored in
sevenSegmentPins array.
** Output: None
*******************************************************************************
/******************************************************************************
** sevenSegment_Write
** Output: None
*******************************************************************************
/******************************************************************************
** spi_setClockDivider
** Output: None
*******************************************************************************
/******************************************************************************
** spi_sendReceive
** Output: None (This command sends one serail byte back to LV for each data byte.
********************************************************************************
/******************************************************************************
** checksum_Compute
********************************************************************************
/******************************************************************************
** checksum_Test
*******************************************************************************
/******************************************************************************
** Parse command packet and write speed, direction, and number of steps to travel
** Output: None
*******************************************************************************
/******************************************************************************
** SampleContinuosly
** Input: void
** Output: void
*******************************************************************************
voidsampleContinously(void);
/******************************************************************************
** finiteAcquisition
** Output: void
********************************************************************************
/******************************************************************************
** lcd_print
** Output: None
*******************************************************************************
if (A0>x1){
if (A1>y1){
'MOVIMIENTO DEL EJE X POSITIVO, MOVIMIENTO DE EJE Y POSITIVO'
}
else if(A1<y2){
'MOVIMIENTO DEL EJE X POSITIVO, MOVIMIENTO DE EJE Y NEGATIVO'
}
else{
'MOVIMIENTO DEL EJE X POSITIVO. EJE Y ESTATICO'
}
}
else if(A0<X2){
if (A1>y1){
'MOVIMIENTO DEL EJE X NEGATIVO, MOVIMIENTO DE EJE Y POSITIVO'
}
else if(A1<y2){
'MOVIMIENTO DEL EJE X NEGATIVO, MOVIMIENTO DE EJE Y NEGATIVO'
}
else{
'MOVIMIENTO DEL EJE X NEGATIVO. EJE Y ESTATICO'
}
else {
if (A1>y1){
'MOVIMIENTO DE EJE Y POSITIVO'
}
else if(A1<y2){
'MOVIMIENTO DE EJE Y NEGATIVO'
}
}