c# - Greater time resolution using .NET Micro Framework on Netduino board (for dimming an LED)? -
i'm programming netduino board using .net micro framework 4.1 , want higher time resolution milliseconds. because i'm attempting dim led blinking fast.
the issue sample code uses thread.sleep(..) takes number of milliseconds.
sample code http://netduino.com/projects/ showing issue in question:
outputport ledonboard = new outputport(pins.onboard_led, false); while (true) { ledonboard.write(true); thread.sleep(1); // << problem: can low 1 millisecond
even if there's way accomplish dimming not using greater time resolution, i'm game.
this doesn't answer question getting better time resolution, solve problem changing brightness on led. should using pwm module netduino.
netduino basics: using pulse width modulation (pwm) great article on how use it.
Comments
Post a Comment