O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading serial data

We will use the pyserial module to read data from the serial port. However, this is not a standard Python module and needs to be installed. We can install it using the following pip command:

pip install pyserial

Once we are able to get data from the Arduino board, we can further process it or plot it in the way we want. However, the goal here is to simply display whatever data is sent by the Arduino board over the serial port, as shown in the following Tkinter window (9.14_read_from_serial_port.py):

In order to read the serial port, we first need to identify the port on which this message is being sent. There are two ways ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required