Refactoring Nucleo thread based blink example sketch.