Go to advanced search

by arpitbt
Mon Aug 05, 2019 5:06 am
Forum: Python
Topic: My program stuck after sometime
Replies: 17
Views: 883

Re: My program stuck after sometime

Hi ghp, Here i have used flag because these bytes(02 01 04 03) comes in serial and if code detects these then and then only go for a main object which is count=28count so i can catch particular bit which is a main object that i want to process. Start is used here to check whether timer value is 10 o...
by arpitbt
Fri Aug 02, 2019 5:56 am
Forum: Python
Topic: My program stuck after sometime
Replies: 17
Views: 883

Re: My program stuck after sometime

Hi pcmanbob, You have suggested me to take "and " operator instead of writing it tother. Actually i need only one of the conditions (use "or" operator) to be true at a time instead of both to be true at the same time. But when i am taking or operator code is not responding of the object variation. C...
by arpitbt
Thu Jul 25, 2019 5:43 am
Forum: Python
Topic: My program stuck after sometime
Replies: 17
Views: 883

Re: My program stuck after sometime

Hi Michiel , I am using this program for object detection. If next object detection is greater or less then 2 than previous object led must on for 10sec. This code is working fine for sometime but after that it is not making led on even though given object condition is satisfied means it only execut...
by arpitbt
Thu Jul 25, 2019 4:33 am
Forum: Python
Topic: My program stuck after sometime
Replies: 17
Views: 883

Re: My program stuck after sometime

Hi

Start is working now by define it as global but sill code stuck at the same place and code is not respond to any movement detected by my sensor as it should be.
by arpitbt
Thu Jul 18, 2019 11:07 am
Forum: Python
Topic: My program stuck after sometime
Replies: 17
Views: 883

Re: My program stuck after sometime

Hi B.Goode, I forgot to post my modified code.My code is below and for that i am facing above issue. And what about stuck problem?And still i am getting same error while replacing "and" with "or". import threading import queue import serial import time import RPi.GPIO as GPIO count_enable=0 count=0 ...
by arpitbt
Thu Jul 18, 2019 10:35 am
Forum: Python
Topic: My program stuck after sometime
Replies: 17
Views: 883

Re: My program stuck after sometime

Still same problem is coming for the given change. And why there is error coming while i have written "or " instead of "and". Error: 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/python...
by arpitbt
Wed Jul 17, 2019 12:46 pm
Forum: Python
Topic: My program stuck after sometime
Replies: 17
Views: 883

Re: My program stuck after sometime

Hi pcmanbob, Here i want both the condition to be true.So i need and operator. When i make change what you have suggested still it is not working smoothly as before. Now It takes time to respond to make led on. Are you sure that sometimes my program get stuck because of this condition not written in...
by arpitbt
Wed Jul 17, 2019 11:57 am
Forum: Python
Topic: My program stuck after sometime
Replies: 17
Views: 883

My program stuck after sometime

My incoming data is in hex . After sometime of program start it is getting stuck and i am getting no output. My program stuck at mostly if start==0: GPIO.output(12,GPIO.LOW) print("wait") this place in code. import threading import queue import serial import time import RPi.GPIO as GPIO count_enable...
by arpitbt
Tue Jul 16, 2019 11:27 am
Forum: Python
Topic: Set and reset led on-off time by checking status of led using timer
Replies: 3
Views: 250

Re: Set and reset led on-off time by checking status of led using timer

Hi pcmanbob, Thanks for the reply. I forgot to mention that incoming data is random hex data program compares one data with next data as per that if next data is greater than or less than previous data it sets flag as 1 otherwise 0. I want my led to start while flag 1 is detected. My led is on pin n...
by arpitbt
Tue Jul 16, 2019 5:08 am
Forum: Python
Topic: How to set python 3.5 as a default language in raspberry pi 3?
Replies: 8
Views: 523

Re: How to set python 3.5 as a default language in raspberry pi 3?

My program based on python3 so if i boot directly from my program will it work fine? Because when program switch from one version to other it gives me an error at run time.
by arpitbt
Mon Jul 15, 2019 12:38 pm
Forum: Python
Topic: How to set python 3.5 as a default language in raspberry pi 3?
Replies: 8
Views: 523

How to set python 3.5 as a default language in raspberry pi 3?

I tried to set python 3.5 using command

cd Desktop
alias python="/usr/bin/python3.5"

but whenever system reboot or restart it again set python2.7 as its default language.I want to set python3.5 as permanently default language.
by arpitbt
Mon Jul 15, 2019 11:03 am
Forum: Python
Topic: Set and reset led on-off time by checking status of led using timer
Replies: 3
Views: 250

Set and reset led on-off time by checking status of led using timer

Hi, I am getting a binary series of 0 and 1 as input.I want to make program for raspberry pi 3 using timer in python. Here timer checks status of 0's and 1's. I want led to turn on for 10 seconds when 1 is detected and if again it detects 1 in between 10 seconds this 10 sec time reset and again set ...

Go to advanced search