// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial1.begin(9600);
pinMode(22, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(26);
int sensorValue2 = analogRead(27);
// print out the value you read:
if(sensorValue>400 && sensorValue2>800){
digitalWrite(22, HIGH);
}else{
digitalWrite(22, LOW);
}
Serial1.println(sensorValue);
delay(100); // delay in between reads for stability
}