
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
<title>LED Strip Bricklet – Tinkerforge</title>

<!--<link type="text/css" rel="stylesheet" href="http://www.tinkerforge.com/static/base_tf.css" />-->
<link type="text/css" rel="stylesheet" href="http://www.tinkerforge.com/static/jquery.lightbox-0.5.css" />
<meta name="keywords" content="Tinkerforge, Open Source Hardware, Bricks, Bricklets, USB Controllable, USB Sensing, USB Controlling" />
<meta name="description" content="Easy-to-use open source hardware. Control motors and sense the environment over USB, Ethernet or Wi-Fi/WLAN with C/C++, C#, Delphi/Lazarus, Java, JavaScript, LabVIEW, Mathematica, MATLAB/Octave, Perl, PHP, Python, Ruby, Shell, Visual Basic .NET or directly over TCP/IP." />
<meta name="copyright" content="Tinkerforge GmbH" />
<!--<script type="text/javascript">document.write('<style>.noscript { display: none; }</style>');</script>-->


    
    <link rel="stylesheet" href="../../_static/documentation_tf.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="top" title="Tinkerforge" href="../../index.html" />
    <link rel="up" title="Bricklets" href="Bricklets.html" />
    <link rel="next" title="Line Bricklet" href="Line.html" />
    <link rel="prev" title="LCD 20x4 Bricklet" href="LCD_20x4.html" />

<script type="text/javascript" src="http://www.tinkerforge.com/static/jquery.lightbox-0.5.js"></script>
<script type="text/javascript">$(function() { $('#gallery a').lightBox(); });</script>
<script type="text/javascript">$(function() { $(".sphinxsidebarwrapper").filter(function() { return $.trim($(this).text()).length == 0; }).parent().hide(); });</script>


  </head>
  <body>
<div id="wrapper">
	<div id="tfcontent">
		<div class="boxContent3">


<div class="toctree">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../Getting_Started.html">Getting Started</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Primer.html">Primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Tutorials.html">Tutorials</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../FAQ.html">FAQ</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="reference internal" href="../../Hardware.html">Hardware</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../Bricks/Bricks.html">Bricks</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="Bricklets.html">Bricklets</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="Ambient_Light.html">Ambient Light Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Analog_In.html">Analog In Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Analog_Out.html">Analog Out Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Barometer.html">Barometer Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Breakout.html">Breakout Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Color.html">Color Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Current12.html">Current12 Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Current25.html">Current25 Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Distance_IR.html">Distance IR Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Distance_US.html">Distance US Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Dual_Button.html">Dual Button Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Dual_Relay.html">Dual Relay Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="GPS.html">GPS Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Hall_Effect.html">Hall Effect Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Humidity.html">Humidity Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Industrial_Digital_In_4.html">Industrial Digital In 4 Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Industrial_Digital_Out_4.html">Industrial Digital Out 4 Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Industrial_Dual_020mA.html">Industrial Dual 0-20mA Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Industrial_Quad_Relay.html">Industrial Quad Relay Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="IO16.html">IO-16 Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="IO4.html">IO-4 Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Joystick.html">Joystick Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="LCD_16x2.html">LCD 16x2 Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="LCD_20x4.html">LCD 20x4 Bricklet</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="">LED Strip Bricklet</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#features">Features</a></li>
<li class="toctree-l4"><a class="reference internal" href="#description">Description</a></li>
<li class="toctree-l4"><a class="reference internal" href="#technical-specifications">Technical Specifications</a></li>
<li class="toctree-l4"><a class="reference internal" href="#resources">Resources</a></li>
<li class="toctree-l4"><a class="reference internal" href="#test-your-led-strip-bricklet">Test your LED Strip Bricklet</a></li>
<li class="toctree-l4"><a class="reference internal" href="#ws2801-ws2811-and-ws2812">WS2801, WS2811 and WS2812</a></li>
<li class="toctree-l4"><a class="reference internal" href="#connectivity">Connectivity</a></li>
<li class="toctree-l4"><a class="reference internal" href="#ram-constraints">RAM Constraints</a></li>
<li class="toctree-l4"><a class="reference internal" href="#ws2812b-led-strips">WS2812B LED Strips</a></li>
<li class="toctree-l4"><a class="reference internal" href="#ws2801-led-strips">WS2801 LED Strips</a></li>
<li class="toctree-l4"><a class="reference internal" href="#led-pixels">LED Pixels</a></li>
<li class="toctree-l4"><a class="reference internal" href="#fixed-frame-rate">Fixed Frame Rate</a></li>
<li class="toctree-l4"><a class="reference internal" href="#case">Case</a></li>
<li class="toctree-l4"><a class="reference internal" href="#programming-interface">Programming Interface</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="Line.html">Line Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Linear_Poti.html">Linear Poti Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Moisture.html">Moisture Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Motion_Detector.html">Motion Detector Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Multi_Touch.html">Multi Touch Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="NFC_RFID.html">NFC/RFID Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Piezo_Buzzer.html">Piezo Buzzer Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Piezo_Speaker.html">Piezo Speaker Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="PTC.html">PTC Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Remote_Switch.html">Remote Switch Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Rotary_Encoder.html">Rotary Encoder Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Rotary_Poti.html">Rotary Poti Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Segment_Display_4x7.html">Segment Display 4x7 Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Solid_State_Relay.html">Solid State Relay Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Sound_Intensity.html">Sound Intensity Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Temperature.html">Temperature Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Temperature_IR.html">Temperature IR Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Tilt.html">Tilt Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Voltage.html">Voltage Bricklet</a></li>
<li class="toctree-l3"><a class="reference internal" href="Voltage_Current.html">Voltage/Current Bricklet</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../Master_Extensions/Master_Extensions.html">Master Extensions</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Power_Supplies/Power_Supplies.html">Power Supplies</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Accessories/Accessories.html">Accessories</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Timeline.html">Timeline</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Software.html">Software</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Brickd.html">Brick Daemon (brickd)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Brickv.html">Brick Viewer (brickv)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/API_Bindings.html">API Bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Firmwares_And_Plugins.html">Firmwares and Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Device_Identifier.html">Device Identifier</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Source_Code.html">Source Code and Bug Tracking</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Programming_Interface.html">Programming Interface</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Kits.html">Starter Kits</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/WeatherStation/WeatherStation.html">Weather Station</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/HardwareHacking/HardwareHacking.html">Hardware Hacking</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/ServerRoomMonitoring/ServerRoomMonitoring.html">Server Room Monitoring</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/Blinkenlights/Blinkenlights.html">Blinkenlights</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/InternetOfThings/InternetOfThings.html">Internet of Things</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/CameraSlider/CameraSlider.html">Camera Slider</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Embedded.html">Embedded Boards</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Embedded/Raspberry_Pi.html">Raspberry Pi</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Specifications.html">Specifications</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Technical_Data.html">Technical Data</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Low_Level_Protocols/TCPIP.html">TCP/IP Protocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Low_Level_Protocols/Modbus.html">Modbus Protocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Low_Level_Protocols/Wireshark_Dissector.html">Wireshark Dissector</a></li>
</ul>
</li>
</ul>

</div>
<div class="breadcrumbs">
<a href="../../Hardware.html">Hardware</a> / <a href="./Bricklets.html">Bricklets</a> / LED Strip Bricklet
</div>



<div id="shoplink_img">
	<a href="../../../shop/bricklets/led-strip-bricklet.html"><img alt="Shop" width="32" height="40" src="../../_images/Misc/cart-icon.png" /></a>
</div>
<div id="shoplink_a">
	<a href="../../../shop/bricklets/led-strip-bricklet.html">In Shop</a>
</div>



    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="led-strip-bricklet">
<span id="id1"></span><h1>LED Strip Bricklet<a class="headerlink" href="#led-strip-bricklet" title="Permalink to this headline">¶</a></h1>
{% from "macros.html" import tfdocstart, tfdocimg, tfdocend %}
{{
    tfdocstart("Bricklets/bricklet_led_strip_tilted_350.jpg",
               "Bricklets/bricklet_led_strip_tilted_600.jpg",
               "LED Strip Bricklet")
}}
{{
    tfdocimg("Bricklets/bricklet_led_strip_vertical_100.jpg",
             "Bricklets/bricklet_led_strip_vertical_600.jpg",
             "LED Strip Bricklet")
}}
{{
    tfdocimg("Bricklets/bricklet_led_strip_horizontal_100.jpg",
             "Bricklets/bricklet_led_strip_horizontal_600.jpg",
             "LED Strip Bricklet")
}}
{{
    tfdocimg("Bricklets/bricklet_led_strip_tilted_back_100.jpg",
             "Bricklets/bricklet_led_strip_tilted_back_600.jpg",
             "LED Strip Bricklet")
}}
{{
    tfdocimg("Cases/bricklet_led_strip_case_tilted_100.jpg",
             "Cases/bricklet_led_strip_case_tilted_600.jpg",
             "LED Strip Bricklet in Case")
}}
{{
    tfdocimg("Bricklets/bricklet_led_strip_50_pixel_100.jpg",
             "Bricklets/bricklet_led_strip_50_pixel_600.jpg",
             "LED Strip Bricklet with 50 RGB LED Pixels")
}}
{{
    tfdocimg("Bricklets/bricklet_led_strip_w_reel_100.jpg",
             "Bricklets/bricklet_led_strip_w_reel_600.jpg",
             "LED Strip Bricklet with RGB LED Strip")
}}
{{
    tfdocimg("Bricklets/bricklet_led_strip_brickv_100.jpg",
             "Bricklets/bricklet_led_strip_brickv.jpg",
             "LED Strip Bricklet in Brick Viewer")
}}
{{
    tfdocimg("Dimensions/led_strip_bricklet_dimensions_100.png",
             "Dimensions/led_strip_bricklet_dimensions_600.png",
             "Outline and drilling plan")
}}
{{ tfdocend() }}<div class="section" id="features">
<h2>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Controls up to 320 RGB LEDs</li>
<li>All LEDs can be switched independently</li>
<li>Update rate of up to 100Hz for each LED possible</li>
</ul>
</div>
<div class="section" id="description">
<span id="led-strip-bricklet-description"></span><h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>The LED Strip <a class="reference internal" href="../../Primer.html#primer-bricklets">Bricklet</a> can be used to
control LED strips and LED pixels that are equipped with the WS2801, WS2811 or
WS2812 LED driver.
It is possible to independently control 320 RGB LEDs (960 individual LEDs) over
the connected <a class="reference internal" href="../../Primer.html#primer-bricks">Brick</a>.</p>
<p>The API allows to change all LEDs at the same time with a fixed update rate
of up to 100Hz. A possible application can be found in the
<a class="reference internal" href="../../Kits/Blinkenlights/Blinkenlights.html#starter-kit-blinkenlights">Starter Kit: Blinken Lights</a>:
<a class="reference external" href="http://www.youtube.com/watch?v=mmNRa-lLaXM">Video</a></p>
<p>Brick Daemon 2.0.10 or newer is recommended for this Bricklet.</p>
</div>
<div class="section" id="technical-specifications">
<h2>Technical Specifications<a class="headerlink" href="#technical-specifications" title="Permalink to this headline">¶</a></h2>
<table border="1" class="docutils">
<colgroup>
<col width="35%" />
<col width="65%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>Supported LED Drivers</td>
<td>WS2801, WS2811 and WS2812</td>
</tr>
<tr class="row-odd"><td>Current Consumption</td>
<td>1mA (idle), 4mA (active)</td>
</tr>
<tr class="row-even"><td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>Resolution</td>
<td>8bit per LED</td>
</tr>
<tr class="row-even"><td>Maximum Number of LEDs</td>
<td>960 (320 RGB LEDs)*</td>
</tr>
<tr class="row-odd"><td>Maximum Update Rate</td>
<td>100 updates per second</td>
</tr>
<tr class="row-even"><td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>Dimensions (W x D x H)</td>
<td>30 x 30 x 12mm (1.18 x 1.18 x 0.47&quot;)</td>
</tr>
<tr class="row-even"><td>Weight</td>
<td>10g</td>
</tr>
</tbody>
</table>
<p>* with a Master Brick, 480 with other Bricks</p>
</div>
<div class="section" id="resources">
<h2>Resources<a class="headerlink" href="#resources" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Schematic (<a class="reference external" href="https://github.com/Tinkerforge/led-strip-bricklet/raw/master/hardware/led-strip-schematic.pdf">Download</a>)</li>
<li>Outline and drilling plan (<a class="reference external" href="../../_images/Dimensions/led_strip_bricklet_dimensions.png">Download</a>)</li>
<li>Source code and design files (<a class="reference external" href="https://github.com/Tinkerforge/led-strip-bricklet/zipball/master">Download</a>)</li>
</ul>
</div>
<div class="section" id="test-your-led-strip-bricklet">
<span id="led-strip-bricklet-test"></span><h2>Test your LED Strip Bricklet<a class="headerlink" href="#test-your-led-strip-bricklet" title="Permalink to this headline">¶</a></h2>
<p>To test a LED Strip Bricklet you need to have <a class="reference internal" href="../../Software/Brickd.html#brickd">Brick Daemon</a> and
<a class="reference internal" href="../../Software/Brickv.html#brickv">Brick Viewer</a> installed. Brick Daemon acts as a proxy between
the USB interface of the Bricks and the API bindings. Brick Viewer connects
to Brick Daemon. It helps to figure out basic information about the connected
Bricks and Bricklets and allows to test them.</p>
<p>Connect the LED Strip Bricklet to a <a class="reference internal" href="../../Primer.html#primer-bricks">Brick</a>
with a Bricklet Cable. After that connect a LED strip or bunch of pixels
to the Bricklet as described below.</p>
<p>If you connect the Brick to the PC over USB, you should see a new tab named
&quot;LED Strip Bricklet&quot; in the Brick Viewer after a moment. Select this tab.
If everything went as expected you can now control a LED strip.</p>
<a class="reference external image-reference" href="../../_images/Bricklets/bricklet_led_strip_brickv.jpg"><img alt="LED Strip Bricklet in Brick Viewer" class="align-center" src="../../_images/bricklet_led_strip_brickv.jpg" style="width: 636.0px; height: 294.0px;" /></a>
<p>After this test you can go on with writing your own application.
See the <a class="reference internal" href="#led-strip-bricklet-programming-interface">Programming Interface</a>
section for the API of the LED Strip Bricklet and examples in different programming
languages.</p>
</div>
<div class="section" id="ws2801-ws2811-and-ws2812">
<span id="led-strip-bricklet-ws28xy"></span><h2>WS2801, WS2811 and WS2812<a class="headerlink" href="#ws2801-ws2811-and-ws2812" title="Permalink to this headline">¶</a></h2>
<p>The LED Strip Bricklet supports LED strips and pixels equipped with the
WS2801, WS2811 or WS2812 driver chip. WS28xy refers to any of these chips.</p>
<p>You have to configure which of this driver chips you want to use with the
Brick Viewer or the <tt class="docutils literal"><span class="pre">set_chip_type()</span></tt> function of the LED Strip Bricklet.
WS2811 and WS2812 requires LED Strip Bricklet plugin version 2.0.2 or newer.</p>
<p>The WS28xy chips can control three LEDs independently. Typically a RGB LED
combined in one package is used. It is controlled over a three or two wire
chained data bus with clock (WS2801 only), data signal and ground as voltage
reference (<a class="reference external" href="http://en.wikipedia.org/wiki/Daisy_chain_(electrical_engineering)">daisy chain</a>).
Each WS28xy chip has a bus input connected to a controlling
device such as the LED Strip Bricklet or to a WS28xy predecessor and a
bus output which can be connected to a subsequent WS28xy chip.
Since it is a chained bus, a single bus output has to be connected only
to a single bus input. The bus is indexed beginning with the first WS28xy on the
LED Strip Bricklet (API index 0).</p>
<a class="reference external image-reference" href="../../_images/Bricklets/bricklet_led_strip_strip_example_800.jpg"><img alt="LED Strip with WS2801" class="align-center" src="../../_images/bricklet_led_strip_strip_example_600.jpg" style="width: 600.0px; height: 77.0px;" /></a>
<p>The above picture depicts a typical WS2801 LED strip. You can see each module
equipped with one WS2801 chip and a connected RGB LED. Recognize the signal
labels for input (IN) and output (OUT): 5V, CK (clock), SD (serial data) and GND.
In contrast to the WS2801, the WS2811 and WS2812 driver chips don't have a
clock signal.</p>
</div>
<div class="section" id="connectivity">
<span id="led-strip-bricklet-connectivity"></span><h2>Connectivity<a class="headerlink" href="#connectivity" title="Permalink to this headline">¶</a></h2>
<p>The following image depicts the interfaces of the LED Strip Bricklet.</p>
<a class="reference external image-reference" href="../../_images/Bricklets/bricklet_led_strip_connection_800.jpg"><img alt="LED Strip Bricklet Interface Description" class="align-center" src="../../_images/bricklet_led_strip_connection_350.jpg" style="width: 350.0px; height: 338.0px;" /></a>
<p>As described in the <a class="reference internal" href="#led-strip-bricklet-ws28xy">WS28xy section</a> above,
the Bricklet supports LED strips and pixels with WS2801, WS2811 or WS2812 driver.
The terminal labeled with &quot;Output&quot; has to be connected with the input of
the first WS28xy driver.</p>
<p>The output terminal consists of four signals:</p>
<ul>
<li><p class="first">&quot;DAT&quot; is the data signal line to the WS28xy chip. It has to be connected to
the data input of the first WS28xy chip. Unfortunately there is no
general label on LED pixels or on LED strips for this input. Sometimes the
signal is marked with SD (Serial Data) or DI (Data Input). It is also
possible that the input of the pixel or strip is not marked, but the output
is marked (DO, Data Output). If the output is marked, the non
marked other side has to be the input.</p>
</li>
<li><p class="first">&quot;CLK&quot; is the clock signal line to the WS2801 chip. It has to be connected
with the clock input of the first WS2801 chip. This input is typically labeled
with CLK, CK or CI (Clock Input). If only the output is labeled it can be
labeled with CO (Clock Output).</p>
<p>The WS2811 and WS2812 chips don't have a clock signal, leave the &quot;CLK&quot;
terminal unconnected form them.</p>
</li>
<li><p class="first">&quot;-&quot; is the ground signal line. Ground is necessary to give a reference for the
DAT and CLK signals.</p>
</li>
<li><p class="first">&quot;+&quot; is the supply voltage output. It is connected to the &quot;+&quot; signal of the
&quot;Input&quot; terminal and should not be used to power LED Strips or pixels.
Leave it unconnected and power the connected strip or pixels directly from
your supply.</p>
</li>
</ul>
<p>The input terminal consisting of two signals:</p>
<ul class="simple">
<li>&quot;+&quot; voltage supply input. It can be connected to the power supply for the
LEDs to measure the supplied voltage. If you don't need this feature you
can leave it unconnected.</li>
<li>&quot;-&quot; is the ground input. It is internally connected with the &quot;-&quot; ground of
the &quot;OUTPUT&quot; terminal.</li>
</ul>
</div>
<div class="section" id="ram-constraints">
<span id="led-strip-bricklet-ram-constraints"></span><h2>RAM Constraints<a class="headerlink" href="#ram-constraints" title="Permalink to this headline">¶</a></h2>
<p>The LED Strip Bricklet needs lots of RAM to store the color data for the LEDs.
Normally the LED Strip Bricklet would only be able to control up to 80 RGB
LEDs with the RAM that is available per Bricklet.</p>
<p>To circumvent this limitation, the LED Strip Bricklet is able to use the
RAM of the remaining unconnected Bricklets. This allows to control up to
320 RGB LEDs with one Master Brick and one LED Strip Bricklet. As described above
these used ports can't be used by other Bricklets.</p>
<p>The maximum number of controllable LEDs is as follows:</p>
<table border="1" class="docutils">
<colgroup>
<col width="35%" />
<col width="65%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Free Bricklet Ports</th>
<th class="head">Maximum number of RGB LEDs</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>80</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>160</td>
</tr>
<tr class="row-even"><td>2</td>
<td>240</td>
</tr>
<tr class="row-odd"><td>3</td>
<td>320</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="ws2812b-led-strips">
<span id="led-strip-bricklet-ws2812b-led-strips"></span><h2>WS2812B LED Strips<a class="headerlink" href="#ws2812b-led-strips" title="Permalink to this headline">¶</a></h2>
<p>There is no general color code for LED strips. Especially sometimes the color
codes are against any agreements. In this WS2812B LED strip example the red
wire is <span class="led-strip-red">5V</span>, green is <span class="led-strip-green">data</span> the white wire is
<span class="led-strip-white">ground</span>.</p>
<p>Connect data of the first strip to the LED Strip Bricklet and
connect ground of your power supply to it. Pay attention to connect the data
<strong>input</strong> of the first strip to the data <strong>output</strong> of the LED Strip Bricklet.</p>
<p>If you want to measure your supply voltage connect 5V to the Bricklet, too.
You can connect more LED strips to the first strip in series (have the
<a class="reference internal" href="#led-strip-bricklet-ram-constraints">RAM constraints</a> in mind).</p>
<p>It is not sufficient to power the LED strips only at one point. We recommend to
feed power to the strip at least every two meters. This can be done
by connecting a cable between the strip and the power supply for each supply
point. This will reduce the resistance and minimize the conduction losses.
See the following image as an example for it.</p>
<a class="reference external image-reference" href="../../_images/Bricklets/bricklet_led_strip_ws2812b_wiring_1500.png"><img alt="LED Strip Bricklet wiring for WS2812B LED Strip" class="align-center" src="../../_images/bricklet_led_strip_ws2812b_wiring_600.png" style="width: 600.0px; height: 172.0px;" /></a>
</div>
<div class="section" id="ws2801-led-strips">
<span id="led-strip-bricklet-ws2801-led-strips"></span><h2>WS2801 LED Strips<a class="headerlink" href="#ws2801-led-strips" title="Permalink to this headline">¶</a></h2>
<p>There is no general color code for LED strips. Especially sometimes the color
codes are against any agreements. In this WS2801 LED strip example the black
wire is <span class="led-strip-black">5V</span>, green is <span class="led-strip-green">clock</span>, red is
<span class="led-strip-red">data</span> and the blue wire is <span class="led-strip-blue">ground</span>.</p>
<p>Connect clock and data of the first strip to the LED Strip Bricklet and
connect ground of your power supply to it. Pay attention to connect the clock
and data <strong>input</strong> of the first strip to the clock and data <strong>output</strong> of the
LED Strip Bricklet.</p>
<p>If you want to measure your supply voltage connect 5V to the Bricklet, too.
You can connect more LED strips to the first strip in series (have the
<a class="reference internal" href="#led-strip-bricklet-ram-constraints">RAM constraints</a> in mind).</p>
<p>It is not sufficient to power the LED strips only at one point. We recommend to
feed power to the strip at least every two meters. This can be done
by connecting a cable between the strip and the power supply for each supply
point. This will reduce the resistance and minimize the conduction losses.
See the following image as an example for it.</p>
<a class="reference external image-reference" href="../../_images/Bricklets/bricklet_led_strip_strip_wiring_1500.jpg"><img alt="LED Strip Bricklet wiring for WS2801 LED Strip" class="align-center" src="../../_images/bricklet_led_strip_strip_wiring_600.jpg" style="width: 600.0px; height: 267.0px;" /></a>
</div>
<div class="section" id="led-pixels">
<span id="led-strip-bricklet-led-pixels"></span><h2>LED Pixels<a class="headerlink" href="#led-pixels" title="Permalink to this headline">¶</a></h2>
<p>The connection of LED pixels to the LED Strip Bricklet is similar to the
connection of LED strips. There is no general color code for LED pixels.
In the following example the red wire is <span class="led-pixel-red">5V</span>,
blue is <span class="led-pixel-blue">ground</span>, <span class="led-pixel-green">clock</span> (WS2801 only) is
green and <span class="led-pixel-white">data</span> is the white wire.</p>
<p>Connect clock (WS2801 only) and data of the first bunch of pixels to the
LED Strip Bricklet and connect ground to it. Pay attention to connect
the clock (WS2801 only) and data <strong>input</strong> of the first pixel to the
clock (WS2801 only) and data <strong>output</strong> of the LED Strip Bricklet.
If you want to measure the voltage of your power supply connect 5V to the
Bricklet, too. You can connect more bunches of LED pixel to the first bunch in
series (have the <a class="reference internal" href="#led-strip-bricklet-ram-constraints">RAM constraints</a> in
mind).</p>
<p>Typically each bunch has power supply wires at the beginning and the end
of the bunch. Connect these over additional wires to the power supply.
You can unite nearby wires. This will reduce the resistance and minimize the
conduction losses.</p>
<a class="reference external image-reference" href="../../_images/Bricklets/bricklet_led_strip_pixel_wiring_1500.jpg"><img alt="LED Strip Bricklet wiring for Pixel" class="align-center" src="../../_images/bricklet_led_strip_pixel_wiring_800.jpg" style="width: 800.0px; height: 229.0px;" /></a>
</div>
<div class="section" id="fixed-frame-rate">
<span id="led-strip-bricklet-fixed-frame-rate"></span><h2>Fixed Frame Rate<a class="headerlink" href="#fixed-frame-rate" title="Permalink to this headline">¶</a></h2>
<p>To achieve a smooth animation a fixed frame rate is desirable. A fixed frame
rate is easy to achieve with a properly configured frame duration and the
<tt class="docutils literal"><span class="pre">FrameRendered</span></tt> callback. The frame duration configures the amount of time
between each frame in ms. The <tt class="docutils literal"><span class="pre">FrameRendered</span></tt> callback is triggered after
a frame is transfered to the LEDs.</p>
<p>For example, if you want to have an animation with 20 frames per second, you
should set the frame duration to 50ms. After the frame duration is set you
need to send the first frame (i.e. you need to set all RGB values), wait
until the <tt class="docutils literal"><span class="pre">FrameRendered</span></tt> callback is triggered, write the next frame and so on.</p>
<a class="reference external image-reference" href="../../_images/Bricklets/bricklet_led_strip_fixed_frame_rate.png"><img alt="Control LEDs with fixed frame rate" class="align-center" src="../../_images/bricklet_led_strip_fixed_frame_rate_230.png" style="width: 230.0px; height: 263.0px;" /></a>
<p>If you receive a <tt class="docutils literal"><span class="pre">FrameRendered</span></tt> callback before all LEDs are set, your frame
rate is too high.</p>
</div>
<div class="section" id="case">
<span id="led-strip-bricklet-case"></span><h2>Case<a class="headerlink" href="#case" title="Permalink to this headline">¶</a></h2>
<p>A <a class="reference external" href="https://www.tinkerforge.com/en/shop/cases/case-led-strip-bricklet.html">laser-cut case for the LED Strip Bricklet</a> is available.</p>
<a class="reference external image-reference" href="../../_images/Cases/bricklet_led_strip_case_tilted_1000.jpg"><img alt="Case for LED Strip Bricklet" class="align-center" src="../../_images/bricklet_led_strip_case_tilted_350.jpg" style="width: 347.0px; height: 350.0px;" /></a>
<p>The assembly is easiest if you follow the following steps:</p>
<ul class="simple">
<li>Screw spacers to the Bricklet,</li>
<li>screw bottom plate to bottom spacers,</li>
<li>build up side plates,</li>
<li>plug side plates into bottom plate and</li>
<li>screw top plate to top spacers.</li>
</ul>
<p>Below you can see an exploded assembly drawing of the LED Strip Bricklet case:</p>
<a class="reference external image-reference" href="../../_images/Exploded/led_strip_exploded.png"><img alt="Exploded assembly drawing for LED Strip Bricklet" class="align-center" src="../../_images/led_strip_exploded_350.png" style="width: 267.0px; height: 350.0px;" /></a>
<p>Hint: There is a protective film on both sides of the plates,
you have to remove it before assembly.</p>
</div>
<div class="section" id="programming-interface">
<span id="led-strip-bricklet-programming-interface"></span><h2>Programming Interface<a class="headerlink" href="#programming-interface" title="Permalink to this headline">¶</a></h2>
<p>See <a class="reference internal" href="../../Programming_Interface.html#programming-interface">Programming Interface</a> for a detailed description.</p>
<table border="1" class="docutils">
<colgroup>
<col width="45%" />
<col width="18%" />
<col width="18%" />
<col width="18%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Language</th>
<th class="head">API</th>
<th class="head">Examples</th>
<th class="head">Installation</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>Modbus</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Modbus.html#led-strip-bricklet-modbus-api">API</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>TCP/IP</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_TCPIP.html#led-strip-bricklet-tcpip-api">API</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>C/C++</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_C.html#led-strip-bricklet-c-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_C.html#led-strip-bricklet-c-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_C.html#api-bindings-c">Installation</a></td>
</tr>
<tr class="row-odd"><td>C#</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_CSharp.html#led-strip-bricklet-csharp-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_CSharp.html#led-strip-bricklet-csharp-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_CSharp.html#api-bindings-csharp">Installation</a></td>
</tr>
<tr class="row-even"><td>Delphi/Lazarus</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Delphi.html#led-strip-bricklet-delphi-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Delphi.html#led-strip-bricklet-delphi-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Delphi.html#api-bindings-delphi">Installation</a></td>
</tr>
<tr class="row-odd"><td>Java</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Java.html#led-strip-bricklet-java-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Java.html#led-strip-bricklet-java-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Java.html#api-bindings-java">Installation</a></td>
</tr>
<tr class="row-even"><td>JavaScript</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_JavaScript.html#led-strip-bricklet-javascript-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_JavaScript.html#led-strip-bricklet-javascript-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_JavaScript.html#api-bindings-javascript">Installation</a></td>
</tr>
<tr class="row-odd"><td>LabVIEW</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_LabVIEW.html#led-strip-bricklet-labview-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_LabVIEW.html#led-strip-bricklet-labview-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_LabVIEW.html#api-bindings-labview">Installation</a></td>
</tr>
<tr class="row-even"><td>Mathematica</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Mathematica.html#led-strip-bricklet-mathematica-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Mathematica.html#led-strip-bricklet-mathematica-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Mathematica.html#api-bindings-mathematica">Installation</a></td>
</tr>
<tr class="row-odd"><td>MATLAB/Octave</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_MATLAB.html#led-strip-bricklet-matlab-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_MATLAB.html#led-strip-bricklet-matlab-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_MATLAB.html#api-bindings-matlab">Installation</a></td>
</tr>
<tr class="row-even"><td>Perl</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Perl.html#led-strip-bricklet-perl-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Perl.html#led-strip-bricklet-perl-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Perl.html#api-bindings-perl">Installation</a></td>
</tr>
<tr class="row-odd"><td>PHP</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_PHP.html#led-strip-bricklet-php-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_PHP.html#led-strip-bricklet-php-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_PHP.html#api-bindings-php">Installation</a></td>
</tr>
<tr class="row-even"><td>Python</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Python.html#led-strip-bricklet-python-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Python.html#led-strip-bricklet-python-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Python.html#api-bindings-python">Installation</a></td>
</tr>
<tr class="row-odd"><td>Ruby</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Ruby.html#led-strip-bricklet-ruby-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Ruby.html#led-strip-bricklet-ruby-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Ruby.html#api-bindings-ruby">Installation</a></td>
</tr>
<tr class="row-even"><td>Shell</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Shell.html#led-strip-bricklet-shell-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_Shell.html#led-strip-bricklet-shell-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Shell.html#api-bindings-shell">Installation</a></td>
</tr>
<tr class="row-odd"><td>Visual Basic .NET</td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_VBNET.html#led-strip-bricklet-vbnet-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricklets/LEDStrip_Bricklet_VBNET.html#led-strip-bricklet-vbnet-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_VBNET.html#api-bindings-vbnet">Installation</a></td>
</tr>
</tbody>
</table>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
		<div id="tf_license">
			<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
				<img alt="Creative Commons Licence" width="88" height="31" style="border-width:0" src="/static/images/cc_license_logo.png" />
			</a>
			The content of this page is licensed under
			<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution 3.0 Unported License</a>.
		</div>
		</div>
	</div>
</div>

  </body>
</html>