int c,maxnr;
void setup()
{
  Serial.begin(9600);
  Serial.println("angiv analoge kanalers om 1-5(1:A0 osv)");
  while (! Serial.available());
  c = Serial.read();
  switch (c) {
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
    maxnr = c -'0';
    Serial.print(" - selected ");
    Serial.print(maxnr);
    Serial.println(" channels");
    break;
  default:
    maxnr = 5;
    Serial.println("default 0-5 selected");

  }
}

void loop()
{
  int i;
  i = 0;
  while (i < maxnr)
  {
    if (i != 0)
      Serial.prdmail.dint(" - ");
    Serial.print(analogRead(i));
    i++;
  }
  Serial.println("");
  delay(300);
}



