Help me make my robot follow me.

Hello, I am currently trying to make a robot that will follow me by using a HiTechnic inferred LED beacon and a HiTechnic Ir seeker sensor. What I want it to do is if the beacon is in sectors 1 thru 4 the robot would turn left until it's in sector 5, and if the beacon in sectors 6 thru 9 the robot would turn right till it's in sector 2, and if it's in sector 2 it does nothing except detect if I am farther than 2 ft using a Parallax Ultrasonic distance sensor, and if I am it will move forward until I am no longer farther than 2 ft. I need help with making my Arduino Uno Board interpret these sensors recorded values so that i can use them in If-Then-Else statements that tell the motors what to do. Can anyone help me?


Please don’t post the same thing in numerous places - i.e. crosspost.