Code 2
Code 2
void setup()
void loop()
while(Serial.available()== 0) {} // serial monitar waits until it receives an input from the user
threshold = Serial.parseInt();// stores the threshold entered by the user and returns it to the serial port.
Serial.println(sent2);
digitalWrite(LedPin, HIGH);// makes the led light when Val exceeds threshold
else
delay(delayT);//