Problems with object tracking using a Dagu compound eye and pan tilt set up

  Currently I am having problems with object tracking.  My current set up is a Dagu compound eye on a Dagu pan/tilt braket with 2 micro servos in it for turning.  All of that is hooked up to a picaxe 28x1 board correctly, but I run into my problem with my code.  My code kinda worked but was really jerky and will still move when there is nothing there.  Also sometimes it will go like it has a mind of its own.  I thought it was moving when there was nothing there because I made it read the two eyes on opposite sides and just turn to the one with higher value.  Next to try to eliminate this, I made it have to be over a certain value to turn but doing this just made it really hard to turn.  So after that I searched LMR to see what I could find and I came up with Oddbot's post on object tracking.(https://www.robotshop.com/letsmakerobots/node/4428)  After reading that I tried his code.  I changed it for my set up but it just drove my servos one way...  After that I tried to see why it did that but his code was a little to much for me.

 

Any advice or comments will be great.

Joe

I think you need to break this down a bit

I would start with a basic program to turn the LED’s on, read the ADC’s and debug the results. Check your numbers and see if they make sense and also make sense in terms of the main code. Check just your servos --What are the min and max positions? What exact number gives you center? Find out and write these numbers down. Continue this process, testing each aspect of the task until they all work. When they do, put them together. Done.