Skip to content

Software: DirectOutput Framework

Tom edited this page Sep 23, 2015 · 8 revisions

The firmware for the TeensyStripController is made to be used with the DirectOutput Framework. The docu for DOF can be found at: http://directoutput.github.io/DirectOutput/


Configuration Example

To use the controller in DOF you will need a global config file (use the global config editor of DOF to create this file) and a cabinet config file containing the necessary information to set up the controller and the ledstrips.

Here is a example cabinet config:

<?xml version="1.0"?>
<Cabinet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <!-- The name of your cabinet. The settings has no technical relevance. -->
  <Name>Lizard Pin</Name>

  <!-- The following section contains the definitions of the output controllers you have installed in your cab.
  Depending on the hardware in your cab the section can also contain additional definitions for other output controllers (e.g. Artnet).
  Some types of output controllers (e.g. Ledwiz) are automatically detected and dont need to be defined (it is still possible to defined them if you like).
  -->
  <OutputControllers>

    <!-- This defines all settings for the TeensyStripController- -->
    <TeensyStripController>
      <!-- Name for the TeensyStripController. DOF uses this name for all references to the controller. 
      Make sure you reference the correct controller name in the toy definitins below. -->
      <Name>TeensyStripController</Name>

      <!-- The number of leds connected to each of the 8 channels of the TeensyStripController. 
	DOF treats all 8 channels like 1 long ledstrip. -->
      <NumberOfLedsStrip1>Number of Leds on 1. output of the Teensy</NumberOfLedsStrip1>
      <NumberOfLedsStrip2>Number of Leds on 2. output of the Teensy</NumberOfLedsStrip2>
      <NumberOfLedsStrip3>Number of Leds on 3. output of the Teensy</NumberOfLedsStrip3>
      <NumberOfLedsStrip4>Number of Leds on 4. output of the Teensy</NumberOfLedsStrip4>
      <NumberOfLedsStrip5>Number of Leds on 5. output of the Teensy</NumberOfLedsStrip5>
      <NumberOfLedsStrip6>Number of Leds on 6. output of the Teensy</NumberOfLedsStrip6>
      <NumberOfLedsStrip7>Number of Leds on 7. output of the Teensy</NumberOfLedsStrip7>
      <NumberOfLedsStrip8>Number of Leds on 8. output of the Teensy</NumberOfLedsStrip8>
      <!-- The TeensyStripController appears to the system as a virtual com port. Specify the name of the virtual com port (e.g. COM15) in the next setting. -->
      <ComPortName>Name of the virtual com port</ComPortName>
    </TeensyStripController>
  </OutputControllers>

  <!-- The Toys section caontains the definitions of the toys in your cab. Depending on the hardware you have you might have additional toy definitions in this section.
  Ledstrip and area toys have to be explicitly defined. Many other toy types (e.g. RGB leds) are automatically configured based on the infomation found in the ini files containg the table configs (but you can define those toys explicitly as well for more detailed control of the setup). 
  -->
  <Toys>

    <!-- Each ledstrip matrix (DOF treats all leds strips as matrices) needs its own LedStrip section.-->
    <LedStrip>
      <!-- The name for the LedStrip toy. This name can be anything you like. Just make sure you reference the correct toy name in the LedWizEquivalent toy definition below. -->
      <Name>PF Back</Name>
      <Width>Number of leds in horizontal direction for the PF back</Width>
      <Height>Number of leds in vertical direction for the PF back</Height>
      <LedStripArrangement>LeftRightTopDown (check the DOF docu for other allowed values)</LedStripArrangement>
      <!-- WS2812 leds use green, red, blue instead of the classical red, green, blue color order. If you use other types of leds all combination R,G, B are valid for the next setting. -->
      <ColorOrder>GRB ()</ColorOrder>
      <!-- Defines the number of the first leds for the strip (DOF treats all 8 channels of the Teensy controller as 1 strip). -->
      <FirstLedNumber>1</FirstLedNumber>
      <!-- DOF supports quite a few other fading curves as well (e.g. Linear). Check the DOF docu for details.-->
      <FadingCurveName>SwissLizardsLedCurve</FadingCurveName>
      <!-- Name of the TeensyStripController as defined above. -->
      <OutputControllerName>TeensyStripController</OutputControllerName>
    </LedStrip>

    <!-- Check comments above for details on the settings -->
    <LedStrip>
      <Name>PF Right</Name>
      <Width>1</Width>
      <Height>65</Height>
      <LedStripArrangement>TopDownLeftRight</LedStripArrangement>
      <ColorOrder>GRB</ColorOrder>
      <FirstLedNumber>97</FirstLedNumber>
      <FadingCurveName>SwissLizardsLedCurve</FadingCurveName>
      <OutputControllerName>TeensyStripController</OutputControllerName>
    </LedStrip>

    <!-- Check comments above for details on the settings -->
    <LedStrip>
      <Name>PF Left</Name>
      <Width>1</Width>
      <Height>65</Height>
      <LedStripArrangement>TopDownLeftRight</LedStripArrangement>
      <ColorOrder>GRB</ColorOrder>
      <FirstLedNumber>167</FirstLedNumber>
      <FadingCurveName>SwissLizardsLedCurve</FadingCurveName>
      <OutputControllerName>TeensyStripController</OutputControllerName>
    </LedStrip>


    <!-- The LedWizEquivalent toy maps the toys defined above to the ini file columns containing the table configs -->
    <LedWizEquivalent>

      <!-- The name can be anything you like, but including the number of the ini file might be a good practice.-->
      <Name>LedWizEquivalent 30</Name>

      <Outputs>

	<LedWizEquivalentOutput>
	  <!--For LedStrip and area toys the OutputName defines the name of the toy (as defined above) which is to be controlled by the ini file. -->
	  <OutputName>PF Back</OutputName>
	  <!-- Column of the ini file containing the config data for the toy defined in the OutputName. -->
	  <LedWizEquivalentOutputNumber>1</LedWizEquivalentOutputNumber>
	</LedWizEquivalentOutput>

	<!-- Check comments above for details on the settings -->
	<LedWizEquivalentOutput>
	  <OutputName>PF Right</OutputName>
	  <LedWizEquivalentOutputNumber>4</LedWizEquivalentOutputNumber>
	</LedWizEquivalentOutput>

	<!-- Check comments above for details on the settings -->
	<LedWizEquivalentOutput>
	  <OutputName>PF Left</OutputName>
	  <LedWizEquivalentOutputNumber>10</LedWizEquivalentOutputNumber>
	</LedWizEquivalentOutput>

      </Outputs>
      <!-- The number of the ini file, which contains the configs for the toys.-->
      <LedWizNumber>30</LedWizNumber>
    </LedWizEquivalent>

  </Toys>

</Cabinet>