I get the need for a code window; all coding forums I've been on since, well, forums began, had a code tag of some form or other. Even Tek-Tips, probably the ugliest forum on the planet, has code.
Sometimes some limited formatting would help, colour say, or perhaps underlining, maybe strike through.
That way one could say "I think the line in red below is my problem", or "I replaced the struck through lines in your code below with the underlined ones. Now it works" kind of thing.
FEBaily:
That way one could say "I think the line in red below is my problem"
I think the marked line below is my problem...
void setup( void )
{
Serial.begin(250000);
}
int mark;
void loop( void )
{
int current;
current = millis();
if ( current - mark >= 1000 )
{
Serial.println(F("TICK")); // <<<<<<<<<< Why does this not work?
mark += 1000;
}
}
FEBaily:
"I replaced the struck through lines in your code below with the underlined ones. Now it works" kind of thing.
Code marked with "rmv" was replaced by code marked with "fix"...
void setup( void )
{
Serial.begin(250000);
}
// rmv int mark;
uint32_t mark; // fix
void loop( void )
{
// rmv int current;
uint32_t mark; // fix
current = millis();
if ( current - mark >= 1000 )
{
Serial.println(F("TICK"));
mark += 1000;
}
}