Jump to content

I was wondering if there was anyone around these forums that could help me out with some issues I seem to have. If you are willing to help me out for maybe 5-10 minutes, I would be very thankful.

i5 4670k | Sapphire 7950 | Kingston 120GB SSD | Seagate 1TB | G.Skill Ripjaw X Series 8GB

PB238Q | Steelseries Sensei | Ducky DK9087 | Qck Heavy

Build Log: http://linustechtips.com/main/topic/44902-from-imac-to-my-own-creation/

Link to comment
https://linustechtips.com/topic/159941-pyqt4-serial-port-programming-python-help/
Share on other sites

Link to post
Share on other sites

If you dont post your problem there is no way anybody can help...

>.<

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to post
Share on other sites

If you dont post your problem there is no way anybody can help...

>.<

 

Whats your problem then?...

I wanted to talk to someone about this. It's more for my general knowledge about serial port programming but a specific question on PyQt4.

 

For PyQt4 I want to setup an array of radio buttons that when I toggle on and off their background colors change and performs some other actions. I want this to look as close to a grid as I can, as I will also have labels to describe each row/column. I just am new to PyQt4 and I'm not sure what module I can use for this task.

 

For serial Port Programming I'm using PySerial. I don't understand how the interaction works though. I have a status packet, with serial commands but when I have a new serial command to be issued, does it resend the whole status packet? I guess just a general explanation of how serial data controlling a product works would be helpful.

i5 4670k | Sapphire 7950 | Kingston 120GB SSD | Seagate 1TB | G.Skill Ripjaw X Series 8GB

PB238Q | Steelseries Sensei | Ducky DK9087 | Qck Heavy

Build Log: http://linustechtips.com/main/topic/44902-from-imac-to-my-own-creation/

Link to post
Share on other sites

I wanted to talk to someone about this. It's more for my general knowledge about serial port programming but a specific question on PyQt4.

 

For PyQt4 I want to setup an array of radio buttons that when I toggle on and off their background colors change and performs some other actions. I want this to look as close to a grid as I can, as I will also have labels to describe each row/column. I just am new to PyQt4 and I'm not sure what module I can use for this task.

 

For serial Port Programming I'm using PySerial. I don't understand how the interaction works though. I have a status packet, with serial commands but when I have a new serial command to be issued, does it resend the whole status packet? I guess just a general explanation of how serial data controlling a product works would be helpful.

I can't help with the PyQt but i might be able to help with the serial.. 

Can you show us some code please and what are you sending the data to?

CPU: i7 4770k | GPU: Sapphire 290 Tri-X OC | RAM: Corsair Vengeance LP 2x8GB | MTB: GA-Z87X-UD5HCOOLER: Noctua NH-D14 | PSU: Corsair 760i | CASE: Corsair 550D | DISPLAY:  BenQ XL2420TE


Firestrike scores - Graphics: 10781 Physics: 9448 Combined: 4289


"Nvidia, Fuck you" - Linus Torvald

Link to post
Share on other sites

I can't help with the PyQt but i might be able to help with the serial.. 

Can you show us some code please and what are you sending the data to?

I dont have much except GUI code for the time being. I am sending data through either a RS-232, RS-485, or USB port. All I'm sending is a serial command that is ten bytes long. Something like 3A3031350D in hex. I am receiving a 24 byte status packet in return. I have looked into PySerial, I just have no experience with it and am not sure how to go about it.

i5 4670k | Sapphire 7950 | Kingston 120GB SSD | Seagate 1TB | G.Skill Ripjaw X Series 8GB

PB238Q | Steelseries Sensei | Ducky DK9087 | Qck Heavy

Build Log: http://linustechtips.com/main/topic/44902-from-imac-to-my-own-creation/

Link to post
Share on other sites

@Enderman @ @Tigerbomb8 

 

I have quite a bit of the UI set but I need help on the PySerial part. If any of you could PM me or something I could just use five minutes of your time to bounce questions off you. Thanks <3

i5 4670k | Sapphire 7950 | Kingston 120GB SSD | Seagate 1TB | G.Skill Ripjaw X Series 8GB

PB238Q | Steelseries Sensei | Ducky DK9087 | Qck Heavy

Build Log: http://linustechtips.com/main/topic/44902-from-imac-to-my-own-creation/

Link to post
Share on other sites

@Enderman @ @Tigerbomb8 

 

I have quite a bit of the UI set but I need help on the PySerial part. If any of you could PM me or something I could just use five minutes of your time to bounce questions off you. Thanks <3

you could ask those questions here

more people will read them, so more people could answer them

plus, it's more community-friendly and more internet-friendly to have a public discussion about problems, so that if someone on the internet has the same problems as yours, he will find answers here thanks to you and the community

Link to post
Share on other sites

you could ask those questions here

more people will read them, so more people could answer them

plus, it's more community-friendly and more internet-friendly to have a public discussion about problems, so that if someone on the internet has the same problems as yours, he will find answers here thanks to you and the community

I pretty much stated above what I was having difficulty with.

 

 

 I am sending data through either a RS-232, RS-485, or USB port. All I'm sending is a serial command that is ten bytes long. Something like 3A3031350D in hex. I am receiving a 24 byte status packet in return. I have looked into PySerial, I just have no experience with it and am not sure how to go about it.

I just basically need help here. I don't know how to set my port value to accept any of those connections and I don't know the proper way about sending/receiving information using serial ports and this module.

i5 4670k | Sapphire 7950 | Kingston 120GB SSD | Seagate 1TB | G.Skill Ripjaw X Series 8GB

PB238Q | Steelseries Sensei | Ducky DK9087 | Qck Heavy

Build Log: http://linustechtips.com/main/topic/44902-from-imac-to-my-own-creation/

Link to post
Share on other sites

  • 1 year later...

I am making a custom arduino GUI using pyqt and pyserial. In my gui I open aother window of serial monitor and connect it to serial port via pyserial. But the process remains active even after I close the serial monitor window and connection to serial port remains active for which I couldn't establish a new connection from any other source.

any solution?

Link to post
Share on other sites

Aww was scrolling through the thread and thought Ciccioo was back.

 

@Spandan_Samiran Make sure you're calling your_serial_port.close() when you close the window.

 

Also the obligatory don't necro threads that are 2 years old.

1474412270.2748842

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×