Go Down

Topic: Arduino Uno hardware test (Read 103 times) previous topic - next topic


On http://forum.arduino.cc/index.php?topic=50203.0 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!

Code: [Select]

//--------------------( 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



That's NOT thee full Sketch.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design & Assembly work undertaken - Arduino repairs & testing - PM for details.


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 terryking.us.

You will also need to install http://arduino-info.wikispaces.com/file/view/LED.zip/405390342/LED.zip
You are a genius! I sis not even know such a thing as "web.archive.org, 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: https://arduino-info.wikispaces.com/Arduino_Test

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

Thank you all,

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131