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.
Blinking, fading and other useful functions
Started by djcult, Aug 16 2010 06:30 PM
2 replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users