Create a built-in "POST" or diagnostics routine

Has anyone tried making a project that contained a hardware check on startup and if a component did not reply send output to an acceptable method such as an LCD screen or a diagnostic port?

I'm only curious as I'm considering making my UNO SMD an ISP or Eeprom programmer and was thinking about making a diagnostic subroutine for bad startups or even while running for hardware
failure.

I don't know how you would know an item was not working?

Most times in the code you can wait for a reply from a device to confirm it get X information or that it is in X state. Most of what you are asking (I think) can be done with simple logic statements
if(this = that) {do this...}

:roll_eyes:

Check out the Arduino as ISP sketch. It has 3 diagnostic lights in it. I am sure you can build off of that.

02660:
I don’t know how you would know an item was not working?

Most times in the code you can wait for a reply from a device to confirm it get X information or that it is in X state. Most of what you are asking (I think) can be done with simple logic statements
if(this = that) {do this…}

:roll_eyes:

I suppose I should give an example…

Say I built an automated module using RFID tags and I had several components that it handled. I thought it would be easier to have it be able to do a “POST” type startup, and an occasional check while running, of the components attached and report back the state of those items, and if anything failed, give a diagnostic code of some kind. I was wondering if it would be easy enough to make a diagnostic “port” or servicing port to say, upload new code/grab a diagnostics log or something without completely ripping apart the setup, because I would assume I’d put it in a nice enclosure and so on. I would have (more than likely) another Arduino that would be setup specifically for diagnostics and interfacing with the service ports on my projects, and if needed, have the ISP ready with any changed code.

Specifically, to be able to do it without a computer. Say I was writing code on my tablet and I had a way to get it onto and SD card type scenario. Trying to find a different way to solve problems :slight_smile:

Basically, I want to be able to hook up to an already setup Arduino project and check for any problems and change the code if needed or at least get a hardware check. I already know the hardware check can be accomplished via logic gates, I’m just not sure how limited an Arduino could be as an ISP flasher, as in could I take code and put it on an SD card, plug the card in, power up the diagnostic Arduino, and have it flash the new code to the Arduino needing an update?? Trying to find a unique way to be able to update things as I work on them without needing to unplug the Arduino from it’s project box or wherever I have it, especially if I have it in a place that would be difficult to get to.

I’ll do some digging myself, I just wondered if anyone else had thought of the same idea and had any pointers.