-solved- solar tracker, if statement trouble, servo error?

I am making a solar tracker that uses two photoresistors to determine a point where they agree is brightest.

The comparison is not executing when there is an imbalance, except far below input limit on one photoresistor, not at all on the other. A small variance doesn’t trigger anything. It has to be large difference. I set the map out from 0 to 100 for simplicity, but I expect when I try 0 to 255 I’ll get the same thing.
the servo is affecting the circuit because I am running the servo off of the Arduino Uno 5V/GND. Thing is, I tried using a 9v battery and it still only executes the if statement that indicates balance. It skips the code “if rise << drop” entirely, and doesn’t execute the “if rise >> drop” as intended (within 10 points of each other), but will execute with a difference around 31.

My question is why aren’t the if statements working? Is the servo motor so readily throwing out transients that the Arduino can’t maintain control of the loop? I put lots of delay statements in trying to give it time to move and settle down. The “if” statement at the beginning and the end of loop message are the only reliable parts of the program.

I will need some help figuring out how to show a schematic. I have a Linux OS.

#include <Servo.h>

const int lineOut = 9;    //Servo command line out to Servo
const int up = A0;        //photo resistor up input
const int dn = A1;        //photo resistor dn input
Servo trakServo;    //create Servo object
int position = 75;   //variable for moving Servo
const int movSun = 4000;  //for delay when centered
const int tblShootPause = 2000;    //for miscellaneous pauses for Serial Monitor
const int servoPause = 150;         //allow some milliseconds for Servo to move

void setup(){
  trakServo.attach(lineOut);  //Set up Servo command line
  Serial.begin(9600);        //in case we need serial monitor

void loop(){

  //read up & dn and store in rise & drop 
  int rise = analogRead(up);
  rise = map(rise, 0, 1023, 0, 100);
  rise = constrain (rise, 0, 100);
  int drop = analogRead(dn);
  drop = map(drop, 0, 1023, 0, 100);
  drop = constrain (drop, 0, 100);

  //debugging input values output to serial monitor
  Serial.print("rise= ");
  Serial.print(".  .drop= ");
  Serial.print(".  .position= ");

  if ((rise >= drop -10) && (rise <= drop +10)) {
    Serial.print(".position centered at ");

  //it may be a problem to determine which is up and which is dn.
  //compare rise with drop, brighter has greater value
  else if ((rise << drop +10) && (position <= 100)) {    //unless drop is 10 points brighter
    position += 5;                                   //and trakServo is not all the way
    trakServo.write(position);                       //up, move position 5 positive.
    delay(servoPause);                               //?need delay to allow finish moving?
    Serial.print("position raised to ");
  else if ((rise >> drop - 10) && (position >= 50)) {     //unless drop is 10 points darker
    position -= 5;                                   //and trakServo is not all the way
    trakServo.write(position);                       //down, move position 5 negative
    delay(servoPause);                               //?need delay to allow finish moving?
    Serial.print("position lowered to ");
  else {
  Serial.println("end of loop");
((rise << drop


else if ((rise >> drop - 10)And again.

Thanks AWOL! I've been jacking with this for two weeks. All better now.