Does anyone else need void runonce();?

I am working on a clock. I need it to check for the current year once per boot, determine if the kids is DST or not, and set certain variables accordingly.

To accomplish this I need it to run the GPS, parse the output, determine the year, run the initDST function, and proceed to void loop();

I do not want to do this in setup, and Ido not want it in the main loop. I want run til done and move on.

Does anyone else see value in a run once and done between void setup and void loop?

Well, the Arduino IDE is expecting this:

pre-setup() code, things like library callouts, variable declarations, pin assignments.

setup() code, which runs one

loop() code, which runs over and over

function()s which are called out by setup() or loop().

So, will you put your code in a function to have it run once in setup(), will you have the function run once in loop()with a flag to indicate it has run, or will you write it to run in-line in setup() or loop()? Those are pretty much the choices.

Actually the sketch is a c/CPP program in the background see

(Actually some one need to check how this forum works as I wrote a post that just disappeared, an it just showed me a create new thread instead) and by the way could the code pasted in code tags just be converted into ordinary text as the styles always go with it, I have to first copy the text to a text editor before posting here)

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.