 {
 
 
+ 
+// if(Serial.available())
+ //{
+  //Serial.println("Goodnight moon!");
   int l = left.read();
   int r = right.read();
   int c = center.read();
   //set inputs
   brainL.inputs[0] = l;
-  brainL.inputs[1] = r;
+  brainR.inputs[1] = c;
+  brainL.inputs[2] = r;
   brainR.inputs[0] = l;
-  brainR.inputs[1] = r;
+  brainR.inputs[1] = c;
+  brainR.inputs[2] = r;
 
   //feed forward and calculate weighted sum
   int resL = brainL.feedForward();



void moveLeft(char d) {
  if (d > 0) {
    motors.leftMotor(0);
  } else {
    motors.leftMotor(180);
  }
}

void moveRight(char d) {
  if (d > 0) {
    motors.rightMotor(180);
  } else {
   motors.rightMotor(0);
  }
}

void moveServo(char d) {
  if (d > 0) {
    motors.rightMotor(180);
    motors.leftMotor(0);
  } else {
    motors.rightMotor(0);
    motors.leftMotor(180);
  }
}

void stopServo() {
  motors.stop();

}

void turnRedbot(char d) {

    motors.rightMotor(-100);
    motors.leftMotor(-100); 

}




void setup()
{
    Serial.begin(9600);
  randomSeed(analogRead(A3));
  brainL.randomize();
  brainR.randomize();



}

