Hey ho!
I'm not sure if there is something like a "best practice" for this, but:
I'm currently using the following code to blink my led in a fixed duration.
Thread t = new Thread( new ThreadStart( delegate( ) { while ( true ) { //Debug.Print(Debug.GC(true).ToString()); ledPort.Write(true); Thread.Sleep(30); ledPort.Write(false); Thread.Sleep(2000); } } ));t.Start( );
I have in mind there was some other method (something called like AutoResetEvent or something in this direction)
So now my question is: What is the best way to solve such repetitive actions like led blinking, etc.
What is most energy and performance efficient?
Greets, Markus