Arduino Uno hardware test

On of several years ago there is a very interesting hardware test program from Terry King: it checks the actual hardware output of every analog and digital pin on the Arduino. The way it is conceived is really genial.

A 220ohm resistor is connected from digital I/O 2 thru 12 and analog I/O 0 thru 5, total 17 resistors, to a common point. This common point is connected with a 100kohm resistor to GND and a 100kohm resistor to +5V. So it sits at 2.5V.

Now I tried the program but receive a compiling error (I use Arduino 1.6.9). Can you please help point me where to look for correcting the errors?

The error returned is to the first line: ‘Serial’ does not name a type

Thanks for helping!

//--------------------( TEST 3 )----------------------------------------

  Serial.println("TEST 003 - Digital Pins Sink Current"); 
  pinMode(2, OUTPUT);      // Set Load pin to Output mode
  digitalWrite(2, HIGH);              // Connect HIGH Load 
  FailArrayPtr    =  0 ;

  //---------( Write the Digital Pin Labels )------------

  //------( Loop thru pins, testing )----------- 
  for (  DigPort2Test = FirstDigPort;
         DigPort2Test <= LastDigPort;
         DigPort2Test ++)
  {//Loop thru Source Tests
    FailArrayPtr ++ ;

    pinMode(DigPort2Test, OUTPUT);      // Set tested pin to Output mode
    digitalWrite(DigPort2Test, LOW);  // Pin Sinks current LOW   
    IntVoltsRead = analogRead(A0);
    FloatVoltsRead = a2d2float (IntVoltsRead);
    pinMode(DigPort2Test, INPUT);      // ReSet tested pin to Input mode   

    Serial.print("   ");     

    if (FloatVoltsRead > LowVoltResultOK
      &&  FloatVoltsRead < HighVoltResultOK)
      FailArray[FailArrayPtr]  = 0;      
      Failure ++;   
      FailArray[FailArrayPtr]  = 1;

  }//END Loop thru Source Tests



Indeed, just found that out too... I wrote an email to Terry, hopefully I get a response; in case so I will post here.

If anyone else has this sketch, please let me know?


Here it is:
I had to use the Wayback Machine because it's missing from

You will also need to install

Here it is:
I had to use the Wayback Machine because it's missing from

You will also need to install

You are a genius! I sis not even know such a thing as ", and "Wayback Machine", I owe you a couple of beers (due in Ghent Belgium, capital of beers).

Meanwhile I also did get a reply from this other Genius, Terry King:

So, for anyone with hardware issues, this is now dug up again.

Thank you all,