const int analogInPin = 0;// Analog input pin that flex sensor 1 is attached to
const int analogInPin1 = 1;// Analog input pin that flex sensor 2 is attached to

int i;
int outputValue = 0; 
int sensorValue = 0; 
int outputValue1 = 1;
int sensorValue1 = 1;
        
void setup() {
  pinMode(13, OUTPUT);
  // initialize serial communications at 9600 bps:
  Serial.begin(9600); 
}

void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);            
  // map it to the range of the analog out:
  outputValue = map(sensorValue, 500, 1500, 0, 300);  
  // change the analog out value:
  analogWrite(analogInPin, outputValue); 
  
  sensorValue1 = analogRead(analogInPin1);
  
  outputValue1 = map(sensorValue1, 500, 1500, 0, 300);  
 
  analogWrite(analogInPin1, outputValue1);

if(i==LOW)  
{if(!(sensorValue == 69) && !(sensorValue1 >= 74))
  {
    i=HIGH;
    digitalWrite(13, HIGH);     
    delay(500);
  }
}

else if(i==HIGH)
 {
if(!(sensorValue == 69) && !(sensorValue1 >= 74))
  
  {i=LOW;
digitalWrite(13,LOW);
delay(500);
}
              
 }

  // print the results to the serial monitor:
  Serial.print("\t sensor 1 = " );                       
  Serial.print(sensorValue);      
  Serial.print("\t output = ");      
  Serial.println(outputValue);   
  Serial.print("\t sensor 2 = ");
  Serial.print(sensorValue1);
  Serial.print("\t output = ");
  Serial.print(outputValue1);
  // wait 10 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:
  delay(25);                     
}