DirectOutput
DirectOutput framework R2 for virtual pinball cabinets.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController Class Reference

This output controller class is used to control the WS2811 led strip controller by Swisslizard. More...

Inheritance diagram for DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController:
Collaboration diagram for DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController:

Public Member Functions

void SetValues (int FirstOutput, byte[] Values)
 Sets the values for one or several outputs of the controller. More...
 
override void Init (Cabinet Cabinet)
 Initializes the output controller. More...
 
override void Finish ()
 Finishes the output controller. More...
 
override void Update ()
 Notifies the updater thread to sdend data to the controller hardware. More...
 
 WS2811StripController ()
 Initializes a new instance of the WS2811StripController class. More...
 

Protected Member Functions

override void OnOutputValueChanged (IOutput Output)
 This method is called whenever the value of a output in the Outputs property changes its value.
More...
 

Properties

int ControllerNumber [get, set]
 Gets or sets the number of the controller. More...
 
int NumberOfLeds [get, set]
 Gets or sets the number of leds on the WS2811 based led strip. More...
 
bool UpdaterThreadIsActive [get]
 Indicates whether the UpdaterThread of the WS2811StripController instance is active or not. More...
 
- Properties inherited from DirectOutput.Cab.Out.OutputControllerBase
virtual OutputList Outputs [get, set]
 Contains the OutputList object for the outputs of the output controller.
More...
 
- Properties inherited from DirectOutput.General.Generic.NamedItemBase
string Name [get, set]
 Name of the named item.
Triggers BeforeNameChange before a new Name is set.
Triggers AfterNameChanged after a new name has been set. More...
 
- Properties inherited from DirectOutput.General.Generic.INamedItem
string Name [get, set]
 Gets or sets the name of the item.
Must fire the BeforeNameChange and AfterNameChange events when the value of the property is changed. More...
 
- Properties inherited from DirectOutput.Cab.Out.IOutputController
new string Name [get, set]
 Name of the IOutputController. This property is fully implemented in the abstract OutputControllerBase class. More...
 
OutputList Outputs [get, set]
 OutputList containing the IOutput objects for a IOutputController. More...
 

Additional Inherited Members

- Events inherited from DirectOutput.General.Generic.NamedItemBase
EventHandler< NameChangeEventArgsAfterNameChanged
 Event is fired after the value of the property Name has changed. More...
 
EventHandler< NameChangeEventArgsBeforeNameChange
 Event is fired before the value of the property Name is changed. More...
 
- Events inherited from DirectOutput.General.Generic.INamedItem
EventHandler< NameChangeEventArgsBeforeNameChange
 Occurs before the name of the item changes. More...
 
EventHandler< NameChangeEventArgsAfterNameChanged
 Occurs when after the name of the item has changed. More...
 

Detailed Description

This output controller class is used to control the WS2811 led strip controller by Swisslizard.

The hardware of this controller is based on a Atmel microcontroller and a FT245R USB interface chip by FTDI. To ensure max performance all copde on the controller has been written in assembler.

WS2811 is a small controller chip which can controll a RGB led (256 PWM level on each channel) and be daisychained, so long cahins of LEDs (led strip are possible. The WS2812 understands the same protocoll as the WS2811, but is a RGB led with integrated controller chip which allows for even more dense populated RGB strips.

Those controller chips are controlled using a single data line (there is no clock line). The data has to be sent with a frequency of 800khz. 1 bits have a duration of 0.65uS high and 0.6uS low. 0 bits have a duration of 0.25uS high and 1uS low. A interuption in the dataflow triggers the controller chips to push the data in the shift register to the PWM outputs. Since the timing requirements are very strict it is not easily possible to output that signal directly from a computer with normal operating system. Thats why controllers like the one displayed below are needed.

WS2811Controller.jpg

This is a image of my controller prototype with classical through the hole parts and a small breakoutboard by SparkFun. At the time of the release of DOF R2, the first prototypes of SMD version of the controller are in production. Check back in the forums for more information.

Constructor & Destructor Documentation

DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController.WS2811StripController ( )

Initializes a new instance of the WS2811StripController class.

Member Function Documentation

override void DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController.Finish ( )
virtual

Finishes the output controller.

Implements DirectOutput.Cab.Out.OutputControllerBase.

override void DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController.Init ( Cabinet  Cabinet)
virtual

Initializes the output controller.

Parameters
CabinetThe Cabinet object which is using the IOutputController instance.

Implements DirectOutput.Cab.Out.OutputControllerBase.

override void DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController.OnOutputValueChanged ( IOutput  Output)
protectedvirtual

This method is called whenever the value of a output in the Outputs property changes its value.

Parameters
OutputThe output which has triggered the event.

Reimplemented from DirectOutput.Cab.Out.OutputControllerBase.

void DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController.SetValues ( int  FirstOutput,
byte[]  Values 
)

Sets the values for one or several outputs of the controller.

Parameters
FirstOutputThe first output to be updated with a new value (zero based).
ValuesThe values to be used.

Implements DirectOutput.Cab.Out.ISupportsSetValues.

override void DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController.Update ( )
virtual

Notifies the updater thread to sdend data to the controller hardware.

Implements DirectOutput.Cab.Out.OutputControllerBase.

Property Documentation

int DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController.ControllerNumber
getset

Gets or sets the number of the controller.

The number of the WS2811 strip controller.

int DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController.NumberOfLeds
getset

Gets or sets the number of leds on the WS2811 based led strip.

The number of leds on the WS2811 based led strip.

bool DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController.UpdaterThreadIsActive
get

Indicates whether the UpdaterThread of the WS2811StripController instance is active or not.


The documentation for this class was generated from the following file: