I'm using the Arduino Leonardo, and I'm using the Serial Monitor. I want the serial Monitor to wait for input before moving on. Anyone know a way to do this?
int threshold;
void setup()
{
Serial.begin(9600);
Serial.println("What would you like the Maximum Threshold to Be?");
threshold = Serial.read(); //RIGHT here I want it to wait for the user to input something, then continue.
Serial.print("Your threshold is ");
Serial.println(threshold);
}
void loop()
{
int sensorInput = analogRead(0);
if (sensorInput > threshhold)
{
Serial.println(sensorInput);
}
delay(100);
}