Labels

Thursday, February 28, 2013

Thinking about a distance sensor experiment

Last night I received another distance sensor, Ultrasonic Module HC-SR04 Distance Sensor For Arduino, from Amazon.  This is a sensor that is a little more long distance than the IR sensor that I have which has a range of 1-12 inches.  Using the two sensors, I now have a short distance and long distance resolution.

I was thinking that I might use the sensors in an experiment on top of the Create that would allow me to figure out the best way to use them.  I would like to design a wall follower.  Both of the sensors could be used to sweep back and forth, gathering distance/angle data and then take that data to build a model workup of the hallway or room that the Create was in.  From that information you could develop a driving routine that would day allow you to follow a wall within 5 inches.  Other parts of the routine would be able to react when something was placed in the way of the Create.  It would have to make a decision to go around and what would be the best way to do that.  I am thinking that the blackboard idea that I have proposed before would be the best option for doing this.  My use of the Blackboard would require me to have an overall computational strategy.  This is something that would need to be worked on.

I am still out on whether I should interface to an Arduino to control the sweeping sensors however.  That seems to be a better way to accomplish the goal.  Both of these sensors interface directly with the Arduino, whereas I would have to really think about how I would do this in the RPi.  I do have more than one RPi in order to accomplish multiple computer type tasks, but a control processor may be more useful this time around.  I could then concentrate on using the RPi to do the decision tasks.