New photo-resistor controlled servos (video)

Hello, I currently have a 10k photo-resistor and a 10k ohm resistor acting a as a voltage divider that is fed into A0 of the arduino. Depending on the light hitting it it will move the top servo either to 0 degrees or to 180 degrees. I also want code to run in the background of the arduino that has 2 separate photo-resistors mounted on each side of the car and depending on which one has more light i want it to control a servo that is able to swing an arm to which ever side has more light. I will have a link to a video below and another link to the page where i got the schematic and code for the top servo and analog voltage divider input.

My question is how do i implement the code to move that bottom servo left or right depending on the photo-resistor on each side?

I understand how to do the wiring for the most part. I would need to create 2 more voltage dividers( one for each photo-resistor) and feed those analog inputs to maybe A1 and A2. I just dont know how to write code, i can kinda of read it and understand it.
Any help and/or advice is much appreciated.

Please post your program here. And please use the code button </> (the one on the left).

Unless you are interested in doing different things depending on the intensity of the light you can probably detect whether or not the LDR is obscured with digitalRead()

And have a look at the demo Several Things at a Time.

...R

if(analogRead(left) > analogRead(right) {
// move  Servo to left use a servo write call 
}
else {
// move servo right
}

Robin2:
Please post your program here. And please use the code button </> (the one on the left).

Unless you are interested in doing different things depending on the intensity of the light you can probably detect whether or not the LDR is obscured with digitalRead()

And have a look at the demo Several Things at a Time.

...R

The code at the bottom is the code in the video that moves the servo with the solar panels on it ( It is really just for show, i might eventually print an enclosure that covers the panels when there is no light and reveals them when there is light).
The code that Grumpy Mike suggested for my code to read the light on each side of the car and swing the servo arm to which ever side has more light is

if(analogRead(left) > analogRead(right) {
// move  Servo to left use a servo write call 
}
else {
// move servo right
}

but im still very new at C language, How could i add the into the code above to my code below? Lets say the LDR on the left Is called "LDRL" and the right one is "LDRR" and those will be hooked up with a 10k resistor as a voltage divider for each one and that will be read by analog pins A1 and A2( A0 is already being used) and my second servo's signal will go into digital pin 8 ( pin 8 will be an output) that will Swing the servo arm to which ever side has more light.
I am starting to practice coding , but do not know enough for this. Any help would be greatly appreciated!

#include <Servo.h>

Servo myservo;
int val;

void setup()
{
myservo.attach(12);
}
void loop()
{
val = analogRead(0);
val = map(val, 0, 1023, 0, 179);
myservo.write(val);
delay(15);
}

Code is simply a set of instructions, you must learn to read them like a book.

For this one time I will show you BUT before you do your own projects you have to learn how to read code. If you can't read code the you can't write it. So do some of the examples in the IDE. Try them get them working change them and get the feel of being in control.

#include <Servo.h>

Servo myservo;
int val;
byte LDRL = 0;
byte LDRR = 1;

void setup()
{
  myservo.attach(12);
}
void loop()
{
   if(analogRead(LDRL) > analogRead(LDRR) ) {
      myservo.write(80); // move to angel 80 degrees or what ever you want
}
else {
     myservo.write(100); // move to angel 100 degrees or what ever you want
  }
}