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