Just a test & play topic

As there is no "Test & play" -subforum ,
I'm using the general discussion-subforum for this.

@moderator: if you think this is misuse make a suggestion how to do it in a more apropriate way and suggest to the main-forum-maintenance-team to add such a sub-firum.

I wanted to test here what happends if I accidently used mouse-rightclick "copy as HTML" instead of "copy for forum" and pasting the clipboard-content

#include <DebugTxtVar.h>

void PrintFileNameDateTime() {
  Serial.println("Code running comes from file ");
  Serial.println(__FILE__);
  Serial.print("  compiled ");
  Serial.print(__DATE__);
  Serial.print(" ");
  Serial.println(__TIME__);  
}


boolean TimePeriodIsOver (unsigned long &periodStartTime, unsigned long TimePeriod) {
  unsigned long currentMillis  = millis();  
  if ( currentMillis - periodStartTime >= TimePeriod )
  {
    periodStartTime = currentMillis; // set new expireTime
    return true;                // more time than TimePeriod) has elapsed since last time if-condition was true
  } 
  else return false;            // not expired
}

unsigned long MyTestTimer = 0;                   // variables MUST be of type unsigned long
const byte    OnBoard_LED = 2;


void BlinkHeartBeatLED(int IO_Pin, int BlinkPeriod) {
  static unsigned long MyBlinkTimer;
  pinMode(IO_Pin, OUTPUT);
  
  if ( TimePeriodIsOver(MyBlinkTimer,BlinkPeriod) ) {
    digitalWrite(IO_Pin,!digitalRead(IO_Pin) ); 
  }
}



void setup() {
  Serial.begin(115200);
  Serial.println("Setup-Start");
  PrintFileNameDateTime();

}


void loop() {
  BlinkHeartBeatLED(OnBoard_LED,100);

  if ( TimePeriodIsOver(MyTestTimer,1000) ) {

  }  

}

aha keeps all the colors. Though I'm using a dark color-theme bad to read on a white backround

OK thanks for testing

Call it the 'Discourse Playground'. :smiley:

I think it's OK here. I do a lot of this sort of experimentation myself to learn how the forum software works and to verify my assumptions.

My feeling at this point is that we should be very conservative about adding new forum categories because there are already so many, which makes it less likely for newcomers to find the appropriate place to make their posts, and more difficult for those who are set on doing so. The majority of the moderation work seems to be moving topics to appropriate categories.

They will inevitably accumulate over time as I haven't seen any efforts to consolidate forum categories that ended up not being useful.