I've written some wrappers around the OutputPort and PWM classes that provide some useful basic functionality. Blinking and fading can be done asyncronously.
Method signatures are:
DiscretePort.TurnOn()
DiscretePort.TurnOff()
DiscretePort.Toggle()
DiscretePort.IsOn
DiscretePort.Blink()
DiscretePort.Blink(int times)
DiscretePort.Blink(int times, bool async)
DiscretePort.Blink(int times, int periodInMilliseconds, bool async)
PwmPort.FadeIn()
PwmPort.FadeIn(int periodInMilliseconds)
PwmPort.FadeIn(int periodInMilliseconds, bool async)
PwmPort.FadeOut()
PwmPort.FadeOut(int periodInMilliseconds)
PwmPort.FadeOut(int periodInMilliseconds, bool async)
PwmPort.FadeInAndOut(int periodInMilliseconds)
PwmPort.FadeInAndOut(int periodInMilliseconds, bool async)
Forgive me if my terminology is all wrong - I'm new to the embedded thing. Code with examples is at here.
djcult
Member Since 16 Aug 2010Offline Last Active Sep 01 2010 12:05 PM