Hi everyone!
I am still trying to create a robot that goes through a corridor and would
then enter a larger space where it would search for a box.
Problem : how to find the box in the larger space using a collect of distances?
Possible Solution : "Check the room and collect the distance readings (array of 5 values for example that are all distances [x, y, z, a, b] ) where you will find some that are closer than others (small swivel on the spot by making a turn and starting from the left then make a 180 deg turn to the right) indicating there is an object in the larger space. The shortest distance collected will be less than the distance to the wall (behind the box) which should indicate there is an object so once you have this you can focus the bot on moving towards the object (remembering what position was the shortest and then returning to that position to move towards the object). Then at a close distance (4cm for example) the robot would stop in front of it. This might be best with the ultrasonic sensor and use the IR sensors to keep the bot from hitting the walls. ~ Thanks to user: "Jon Morss"
Still feels like something is missing not sure however and how I might put this into code also open to other suggestions?
Many Thanks