Turning on/off motion sensor through android
Posted: Tue Mar 22, 2016 4:53 am
here is the basic of the code
if motionVallue == 3 when on is pressed in android 3 comes as value in python
then it search for the input from the motion sensor
infinite loop
if motionValue == 2
stop the motion sensor
This is not working. i can turn on the motion sensor. then the loop continues. and it never accepts motionValue == 2 part. It just continue the motion.. I did try using break. Then it stop sensing. Any ideas on how to make the motionValue == 2 work..The loop should be continuous and when press off button it should off the motion sensor and if on the motion sensor should be on without the programming terminating.
if motionVallue == 3 when on is pressed in android 3 comes as value in python
then it search for the input from the motion sensor
infinite loop
if motionValue == 2
stop the motion sensor
This is not working. i can turn on the motion sensor. then the loop continues. and it never accepts motionValue == 2 part. It just continue the motion.. I did try using break. Then it stop sensing. Any ideas on how to make the motionValue == 2 work..The loop should be continuous and when press off button it should off the motion sensor and if on the motion sensor should be on without the programming terminating.