/*

Testscript for the  the Serial.parseInt() function

- Type an integer number in the terminal.
- Watch what happens: Do you need an end of line char?

by chris_

*/

void setup() 
{
 Serial.begin(9600);
  Serial.println("Hello, I'm in a terminal!");
  Serial.println();
}

void loop() 
{
  int n=Serial.available();

  if (n > 0)
  {
    Serial.print("available ");Serial.print(n);Serial.print(", value=");
    long myInt = Serial.parseInt(SKIP_ALL, '\n');
    Serial.println(myInt);
  }
}