Python Forum
Read Data from Serial port
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read Data from Serial port
#1
Hi Team

Is Amy one who have code for read data from Serial port like Arduino and put the reading to the Entry Widgets or Text widget

I have a code which can read data coming from Serial port and it showing on the Python shell . But I need to visible it on the Entry Widget or Text Widget

Note: I can manage Arduino code Therefore I not need Adruino code

Thanks in advanced
Reply
#2
you can use pyserial, to install pip install pyserial
documentation has ample examples: https://pythonhosted.org/pyserial/
Reply
#3
@PA3040 I have done this already and what @Larz60+ pointed out is one way to get started on that but once you do get that you are going to discover lots of little oddities and unfriendlinesses with it -- unless you have someone who can point those out to you in advance still...

If you already have a python program that pulls data from a serial device through a serial port then make that its own separate class and using whatever you already are using (aka you do not need pyserial) just send that data to your python-qt application. I can show you how to do this as well if you are wanting help with that. Basically use the MVC methodology keeping your Data Source (Model) completely separated from your GUI (View) and passing that data through your Controller module
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Serial port Auto detection GUI Tour PA3040 0 3,955 Aug-31-2020, 07:22 AM
Last Post: PA3040
  [Tkinter] Serial Port data readout macellan85 3 7,836 Jun-19-2020, 12:32 PM
Last Post: deanhystad
  [PyQt] Sending 4 bytes Hex data over serial in PyQt gratna 4 8,536 Nov-07-2019, 04:04 PM
Last Post: gratna
  Read Pins by UART Serial Communication Tonyita 0 2,173 May-06-2018, 10:13 PM
Last Post: Tonyita

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020