You don't actually handle the 'both' case where you test for left/right/both/none. I assume it means that you are pointing the right way and should go into your range check, but the algorithm as described would start turning in an arbitrary direction.
Gut feeling is that the two checks for PIR sensors picking up motion should be the same check i.e. your initial state is the same as the state when you are clear of obstacles and motion.
I assume you mean to turn towards the motion and then try to move to within 36", but the logic as described would not stop turning if you were already within 36".
What do you intend your 'bot to do about motion detection while it is moving forward? It seems to me that it should always steer towards detected motion but what should it do if there is nothing in range and it stops detecting motion?
Thanks for the response Peter.
Below I updated my flowchart...hopefully a bit better.
Yeah, shortly after I posted, I noticed the 'both' condition for the motion sensors.
I may have to modify the 'left, right, both & none' condition with the decision 'are both motion sensors picking up motion?'
On the turning part, I wanted the bot to turn (left or right) depending on what sensor picks up motion, to turn until both motion sensors are picking up motion. Then stop turning & proceed.
On the PING min. threshold, my intention was to check and see if the min. threshold was greater or equal to (36") to proceed (with both motion sensors active).
And also stay at that threshold while following or when the person/motion stops.
When there's no motion, atm, just stop. But later possibly search for motion by turning one way 360deg. or traveling in a 'X' distance radius...
But for now, I think just stop when there's no motion on either left ot right PIR sensors...unless maybe one sensor picks up motion,
then go through the routine to find where both motion sensors are active or pick up motion.