Go to advanced search

by Arpitthumar
Tue Aug 13, 2019 11:01 am
Forum: Python
Topic: My python program respond responding very slow as time goes on
Replies: 14
Views: 1702

Re: My python program respond responding very slow as time goes on

ghp wrote:
Sat Aug 10, 2019 3:45 pm
Could you give some details about the solution found ?
I use multiprocessing instead of threading.
by Arpitthumar
Fri Aug 09, 2019 8:43 am
Forum: Python
Topic: How do i debug my code of python 3.5 ?
Replies: 6
Views: 380

Re: How do i debug my code of python 3.5 ?

Thanks, Paddyg for this answer.
by Arpitthumar
Fri Aug 09, 2019 8:41 am
Forum: Python
Topic: My python program respond responding very slow as time goes on
Replies: 14
Views: 1702

Re: My python program respond responding very slow as time goes on

Andyroo wrote:
Thu Aug 08, 2019 1:39 pm
Just seen you have a thread running on debugging your code at https://www.raspberrypi.org/forums/view ... 2&t=247957 so I’ll leave this one now.
Hi Andryoo,

Thanks to all for the help. I have solved this problem.
by Arpitthumar
Thu Aug 08, 2019 9:40 am
Forum: Python
Topic: How do i debug my code of python 3.5 ?
Replies: 6
Views: 380

Re: How do i debug my code of python 3.5 ?

Hi paddyg, Hi, I'm not sure if this helps but here's your code with non-essentials and duplication stripped away. It doesn't make much sense to me as I don't know what you are trying to do! if flag == 4 and count == 28: ser.write(rbuff) lcd_string(str(rbuff), LCD_LINE_2, 2) count = 0 flag = 0 pin18 ...
by Arpitthumar
Wed Aug 07, 2019 9:42 am
Forum: Python
Topic: My python program respond responding very slow as time goes on
Replies: 14
Views: 1702

Re: My python program respond responding very slow as time goes on

Hi, I would assume the lcd routine is blocking and the program will not continue till it is complete. You could look to move the lcd command into its own thread and pass the data via a queue so the main part of the program can run without interruption. You find an example of threading in this earlie...
by Arpitthumar
Tue Aug 06, 2019 9:20 am
Forum: Python
Topic: My python program respond responding very slow as time goes on
Replies: 14
Views: 1702

Re: My python program respond responding very slow as time goes on

Hi Andyroo, I would assume the lcd routine is blocking and the program will not continue till it is complete. You could look to move the lcd command into its own thread and pass the data via a queue so the main part of the program can run without interruption. As this is my first code in python i ha...
by Arpitthumar
Tue Aug 06, 2019 8:36 am
Forum: Python
Topic: My python program respond responding very slow as time goes on
Replies: 14
Views: 1702

Re: My python program respond responding very slow as time goes on

Hi gordon77,

Rbuff data is a serial input which is coming from the radar sensor. If the number of the object is increased data increases and if the object decreases it's vice-versa.
by Arpitthumar
Tue Aug 06, 2019 7:53 am
Forum: Python
Topic: My python program respond responding very slow as time goes on
Replies: 14
Views: 1702

Re: My python program respond responding very slow as time goes on

Does anybody have a solution of this post?
by Arpitthumar
Tue Aug 06, 2019 5:48 am
Forum: Python
Topic: How do i debug my code of python 3.5 ?
Replies: 6
Views: 380

Re: How do i debug my code of python 3.5 ?

Hi bensimmo, Thanks for the reply. Before i add lcd code it was running and responding well but after some time it gets stuck over here in this condition. if start==0: GPIO.output(18,GPIO.LOW) print("wait") . But when i add code of lcd and try to print object which comes on count=28 using lcd_string...
by Arpitthumar
Tue Aug 06, 2019 4:39 am
Forum: Python
Topic: How do i debug my code of python 3.5 ?
Replies: 6
Views: 380

How do i debug my code of python 3.5 ?

I am using python3.5 in raspberry pi3. As my program stuck and taking time to display and respond late so I want to debug my code. How do i debug my code?
by Arpitthumar
Fri Aug 02, 2019 5:08 am
Forum: Python
Topic: My python program respond responding very slow as time goes on
Replies: 14
Views: 1702

My python program respond responding very slow as time goes on

My code was working ok before i include 20x4 lcd code. When i include lcd code is not responding or very late responding specially in while loop lcd_string(str(rbuff),LCD_LINE_2,2) this line. But when i remove this code line it is responding fast. What Does it make respond to late? How do i make thi...
by Arpitthumar
Thu Aug 01, 2019 12:42 pm
Forum: Python
Topic: Can i take while loop in thread ?
Replies: 2
Views: 562

Can i take while loop in thread ?

Is timer and thread both are same? If yes can i take an infinite loop and initialize lcd's main function under thread or timer? If i want to study abut thread and timer suggest me a website or share a link.

Thank you.
by Arpitthumar
Thu Aug 01, 2019 5:44 am
Forum: Python
Topic: TypeError: lcd_string() missing 1 required positional argument: 'style'
Replies: 2
Views: 264

TypeError: lcd_string() missing 1 required positional argument: 'style'

I am getting below error while display serial data on lcd.

Error is
lcd_string(rbuff,1)
TypeError: lcd_string() missing 1 required positional argument: 'style'

Code: Select all


  while True:
    rbuff=ser.read()
    lcd_byte(LCD_LINE_1, LCD_CMD)
    lcd_string(rbuff,1)
    time.sleep(1) 

by Arpitthumar
Wed Jul 31, 2019 9:01 am
Forum: Python
Topic: How do i display incoming serial data on 20x4lcd?
Replies: 5
Views: 291

Re: How do i display incoming serial data on 20x4lcd?

Hi

I am using JHD629-204A 20x4 LCD display. Kindly share code example links If you have any.
by Arpitthumar
Wed Jul 31, 2019 5:33 am
Forum: Python
Topic: How do i display incoming serial data on 20x4lcd?
Replies: 5
Views: 291

How do i display incoming serial data on 20x4lcd?

Hi
I am using a 20x4 lcd. I want to display incoming serial data(ex. 0x02 0x04 0xff)on lcd in a scrolling manner. How do i do that?
by Arpitthumar
Fri Jul 12, 2019 10:28 am
Forum: Python
Topic: How to check output using timer at every second ?
Replies: 13
Views: 701

Re: How to check output using timer at every second ?

Here is one full stream om which i am testing this. It is an infinite stream. In this i have to detect the first 4 byte 20 01 04 03 if it is detected its 28th bit which is 06(its array so it starts from 0) which is a total number of objects. It may change as per increase and decrease in the total nu...
by Arpitthumar
Fri Jul 12, 2019 5:28 am
Forum: Python
Topic: ValueError: chr() arg not in range(0x110000)
Replies: 8
Views: 667

Re: ValueError: chr() arg not in range(0x110000)

Hi Paeryn,

Thanks.The problem has been solved.
by Arpitthumar
Fri Jul 12, 2019 4:53 am
Forum: Python
Topic: How to check output using timer at every second ?
Replies: 13
Views: 701

Re: How to check output using timer at every second ?

Hi Gordon77, Thanks for the replay. In this code when objects(rbuff) greater than or less than previous object(temp) Led must get on and when this happens it must on for 20 second and background process of checking led status should be continue. And during 20 seconds of led on period if it again det...
by Arpitthumar
Thu Jul 11, 2019 10:54 am
Forum: Python
Topic: ValueError: chr() arg not in range(0x110000)
Replies: 8
Views: 667

Re: ValueError: chr() arg not in range(0x110000)

I am getting this error while updating code like you have said. Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/usr/lib/python3.5/threading.py", line 862, in run self._target(*self._args, **self....
by Arpitthumar
Thu Jul 11, 2019 5:23 am
Forum: Python
Topic: getting horizontal question question mark symbol instead of code in .py file
Replies: 4
Views: 289

Re: getting horizontal question question mark symbol instead of code in .py file

what .py file ? Can you show us the .py script ? I have been facing this problem for last 2 days. Before that there was not any problem.It generally comes when i shutdown my pc and then restart. Today when I modified wpa__supplicant.conf and restart my pc same thing happen in this file also. There ...
by Arpitthumar
Wed Jul 10, 2019 10:13 am
Forum: Python
Topic: getting horizontal question question mark symbol instead of code in .py file
Replies: 4
Views: 289

getting horizontal question question mark symbol instead of code in .py file

I am getting a big horizontal line of a question mark

??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

like this in my .py file.
by Arpitthumar
Tue Jul 09, 2019 6:18 am
Forum: Python
Topic: ValueError: chr() arg not in range(0x110000)
Replies: 8
Views: 667

Re: ValueError: chr() arg not in range(0x110000)

Please post the full error msg instead of posting your interpretation... And use a code block so that it's readable Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/usr/lib/python3.5/threading.py...
by Arpitthumar
Tue Jul 09, 2019 4:20 am
Forum: Python
Topic: How to check output using timer at every second ?
Replies: 13
Views: 701

Re: How to check output using timer at every second ?

hex data is my serial input. But as per ser.read reads character that's why i am comparing incoming data using chr(). My data is coming 0x00 to 0xff.
by Arpitthumar
Mon Jul 08, 2019 11:34 am
Forum: Python
Topic: ValueError: chr() arg not in range(0x110000)
Replies: 8
Views: 667

ValueError: chr() arg not in range(0x110000)

I am using python 3.5 and i am getting error ValueError: chr() arg not in range(0x110000)in my code while i was using python 2.7 i was getting ValueError: chr() arg not in range(256). at if temp == chr(ord(rbuff)+1) or temp == chr(ord(rbuff)-1) or temp == chr(ord(rbuff)+2) or temp == chr(ord(rbuff)-...

Go to advanced search