0% found this document useful (0 votes)
15 views5 pages

Programmable Devices

Uploaded by

Joshio Cano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

Programmable Devices

Uploaded by

Joshio Cano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

PROGRAMMABLE

DEVICES
UNIT III
Act 2. “Reading a signal in
Python from Arduino”
Biomedical Engineering
Student: Gisel Juana Silvestre Gutierrez
Professor: Sergio Abraham Acosta Vázquez
School enrolment : 1319121101
Date: 26/07/2022
Engineering Biomedical
Computer Aided Design Delivery Date: 26/07/2022
Specific Competence:Generate the reading of an analog signal, digitize it
Unit III through communication between Python and Arduino, coding experimentation.

Activity:

READING A SIGNAL IN PYTHON FROM ARDUINO


Gisel Juana Silvestre Gutierrez
[email protected]

I. INTRODUCTION
ABSTRACT
during this practice we were given the task
A communication between two of making a communication or as it is
software’s is the mechanism or tool usually known an interface between the
called interface, which enables this python software and Arduino, that with this
communication through the same we will be using the component with
representation of a set of objects, icons the same name as the Arduino one
and graphic elements that come to software, where a signal will be created
function as metaphors or symbols of the using the component, making a python
actions or tasks that the user can code.
perform on the computer.
There are basically two types of
II. METHODS AND
interfaces: the physical interface, made MATERIALS
up of objects that allow us to enter data
and manipulate the computer, such as Python is one of the programming
the mouse or keyboard, which function languages easy to handle, with its simplicity
as prostheses or extensions of our body, of use allows you to quickly make small
and the graphic interface, which allows programs and scripts, with very short
humans to interact with the computer development times, highlighting the ease of
through a series of graphic elements. communicating with different devices
(computers, tablet, smarthones), either by
Basically, the communication between cable, bluetooth, or Internet. (Luis llamas,
two software is designated as the 25-01-16)
physical and functional connection that
is established between two devices, MATERIALS
devices or systems that function
✓ Python
independently of each other. (26-07-22).
✓ Arduino
KEY WORDS:
METHODS
✓ Software’s
First of all you must install the libraries for
✓ Communication
the communication to be possible between
✓ Connection
these two tools, when you have installed
✓ Function
Python to be able to communicate with
Arduino you need the PySerial library, called "arduino". In the constructor of the
which allows you to use the serial port in a Serial object, we pass the serial port
simple way. Download and run the installer parameters to be used.
to add the PySerial library to your Python
using the "readline()" command of the
installation.
Serial object to read a line sent by the
Arduino. We display the line on the screen
using the "Print()" command, finally using
the "close()" command to close the serial
port.
We will use the serial port with PySerial,
importing the "time" library.
This library is so that there is a certain time
to open the serial port. Therefore, a timeout
Fig 1. “Installation Pyserial library” has to be introduced using the "Sleep"
function, which belongs to the "time"
library. (Luis llamas,25-01-16).
II.I COMUNICATION PYTHON
AND ARDUINO II.II IMAGE PROCESSING IN
For this first example we will read the
PYTHON
information sent by the Arduino and Image processing is commonly known as
captured and displayed on screen by "digital image processing" computer vision,
Python. being one of the most used domains. Image
To do this we will start loading the processing algorithms and computer vision
following sketch in Arduino, which simply (CV) algorithms accept images as input,
sends continuously once per second the however, in image processing, the output is
text "Hello World". also an image, but in computer vision, the
output may contain some features
information about the image.
This process is useful because the data that
is collected or generated is largely raw data,
i.e. it is not suitable for use in applications
Fig 2. “Code in Arduino”
directly for several possible reasons.
Therefore, they must first be analyzed,
the Python script will be realized. Creating performing the necessary preprocessing,
a new empty text file, saving it with the and then used. (PHAROS).
name "read.py".

Fig 3. “New code in python”


What is done is to import the Serial library
(PySerial) and instantiate a PySerial object,
Fig 4. “Collected data”
III. RESULT AND
CONCLUSIONS

Unfortunately for this practice I did not


have the opportunity to have good results
as expected because I do not have the
physical material to test the codes
mentioned above, but in my personal
opinion is an easy example and a code and
programs with ease of use because in the
most attentive way I wanted to summarize
this little practice to be of an easy
understanding, without any problem to
present except for the components as in my
case.

IV. BIBLIOGRAPHIES
[1] PHAROS . (***). Introducción al
procesamiento de imágenes en Python con
OpenCV. ***, de PHAROS Sitio web:
https://pharos.sh/introduccion-al-
procesamiento-de-imagenes-en-python-
con-opencv/
[2] Luis llamas . (25 ENERO, 2016).
CONTROLAR ARDUINO CON PYTHON Y LA
LIBRERÍA PYSERIAL. 25 ENERO, 2016, de
*** Sitio web:
https://www.luisllamas.es/controlar-
arduino-con-python-y-la-libreria-pyserial/
[3] SIGNIFICADOS . (26 de julio de 2022,).
Significado de Interfaz. 26 de julio de 2022,,
de *** Sitio web:
https://www.significados.com/interfaz/#:
~:text=Como%20interfaz%20designamos
%2C%20en%20inform%C3%A1tica,por%
20medio%20de%20una%20interfaz
Lista de Cotejo
Serie de Ejercicios

UNIVERSIDAD POLITÉCNICA DE CUAUTITLÁN IZCALLI


DATOS GENERALES DEL PROCESO DE EVALUACIÓN
Nombre del Alumno: Matrícula:

Título del Producto: Fecha:

Período cuatrimestral:
Asignatura:

Firma del Docente:


Nombre del Docente:

INS TRUCCIONE S
Revisar las actividades que se solicitan y marque en los apartados "SI" cuando la evidencia se cumple; en caso contrario
marque "NO". En la columna "OBSERVACIONES", indicaciones que puedan ayudar al alumno a saber cuáles son las
condiciones no cumplidas, si fuese necesario.
Valor del Cumple
Características a cumplir (Reactivo) OBSERVACIONES
reactivo SI NO
Se encuentran contestados en su totalidad los
20%
ejercicios solicitados.
Cada ejercicio muestra los datos, el desarrollo y el
20%
resultado, claramente identificados.
Cada ejercicio muestra un desarrollo claro y
20% coherente, de acuerdo a lo explicado por el
profesor.
El resultado presenta las unidades correctas o en
20% su defecto las unidades solicitadas en la
presentación del resultado.
Los ejercicios se encuentran en orden y con
20% limpieza.

CALIFICACIÓN:
100%

CALIFICACIÓN DE LA CALIFICACIÓN FINAL (Promedio de


SOLUCIÓN DE lista de cotejo y de solución):

You might also like