{"id":1260,"date":"2018-06-16T13:00:41","date_gmt":"2018-06-16T13:00:41","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=1260"},"modified":"2018-06-17T23:42:20","modified_gmt":"2018-06-17T22:42:20","slug":"individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/","title":{"rendered":"Individually Addressable WS2812B Full Color LED strip Code Examples and Review"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1277\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/addressable_leds\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_leds.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"addressable_leds\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_leds.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_leds.jpg?fit=678%2C254&amp;ssl=1\" class=\"size-full wp-image-1277 aligncenter\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_leds.jpg?resize=678%2C254\" alt=\"\" width=\"678\" height=\"254\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_leds.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_leds.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_leds.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_leds.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/p>\n<p>Today I review an\u00a0individually addressable WS2812B Full Color LED strip and provide some code examples.<\/p>\n<p><!--more--><\/p>\n<h2>Overview of the WS2812B Full Color LED strip<\/h2>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1274\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/addressable_strip_post_main_img\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_strip_post_main_img.jpg?fit=800%2C800&amp;ssl=1\" data-orig-size=\"800,800\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"addressable_strip_post_main_img\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_strip_post_main_img.jpg?fit=300%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_strip_post_main_img.jpg?fit=678%2C678&amp;ssl=1\" class=\"alignleft wp-image-1274\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_strip_post_main_img.jpg?resize=350%2C350\" alt=\"\" width=\"350\" height=\"350\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_strip_post_main_img.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_strip_post_main_img.jpg?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_strip_post_main_img.jpg?resize=768%2C768&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_strip_post_main_img.jpg?resize=50%2C50&amp;ssl=1 50w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/>The WS2812B Full colour LED strip I purchased is 5 meters long and has 150 LED&#8217;s on it. Each LED has its LED driver which allows each one to be individually addressable.<\/p>\n<p>Between each LED is a cutting point to allow the strip to be cut to the required length easily. The connections on the LED strip are <code>GND<\/code>, <code>Digital in\/out<\/code>,\u00a0and\u00a0<code>5V<\/code>. the simple connections allow\u00a0you to easily cut up the LED strip as required.<\/p>\n<p>Another advantage of these LED strips is that there is excellent Arduino support from the FastLED library. This allows you to easily control each LED or all of them at once.<\/p>\n<p>&nbsp;<\/p>\n<h2>Wiring it up to an Arduino<\/h2>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1261\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/led_strip_wiring_breadboard\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?fit=1609%2C819&amp;ssl=1\" data-orig-size=\"1609,819\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"led_strip_wiring_breadboard\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?fit=300%2C153&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?fit=678%2C345&amp;ssl=1\" class=\"aligncenter size-full wp-image-1261\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?resize=678%2C345\" alt=\"\" width=\"678\" height=\"345\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?w=1609&amp;ssl=1 1609w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?resize=300%2C153&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?resize=1024%2C521&amp;ssl=1 1024w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?resize=768%2C391&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?resize=1536%2C782&amp;ssl=1 1536w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?resize=50%2C25&amp;ssl=1 50w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/led_strip_wiring_breadboard.jpg?w=1356&amp;ssl=1 1356w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/>Here is it expected that we have cut a specific length (or are using the entire length) of the LED strip and each Digital In is connected to each Digital Out.<\/p>\n<p>The 5V and ground are connected to the Arduino&#8217;s 5V and GND ports respectively. To reduce the noise and current on the digital line it is recommended to put a 330\u03a9 resistor between the Digital in and the Arduino\u00a0digital pin you are using. Here I have wired the circuit to Arduino pin 3.<\/p>\n<h2>Programming the Arduino with the WS2812B Full Color LED strip<\/h2>\n<p>To program the WS2812B full colour\u00a0LED strip I am going to use the FastLED library. This handles some of the complexities of talking to the LED strip and accessing each LED. This can be obtained by adding the &#8220;FastLED&#8221; library in the &#8220;manage library&#8221; section of the Arduino IDE.<\/p>\n<p>The first step to program the LED strip is to define some constants and set up the LED&#8217;s.<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">#include &lt;FastLED.h&gt;\r\n#define LED_PIN 3\r\n#define NUM_LEDS 100\r\n\r\nCRGB leds&#x5B;NUM_LEDS];<\/pre>\n<p>Above I include the FastLED library and define that the LED data pin will be pin 2. I also set up the number of LED&#8217;s I am going to be accessing (set to 100). Then an array of CRGB objects is created, each array element provides control over a single LED. In creating this object I use the <code>NUM_LEDS<\/code>\u00a0define so that the number is constant throughout the program.<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">void setup() {\r\n\u00a0 \u00a0 FastLED.addLeds&lt;WS2812, LED_PIN, GRB&gt;(leds, NUM_LEDS);\r\n}<\/pre>\n<p>In the setup function I add the LED&#8217;s\u00a0defined above into the FastLED library. This configures them so that they can be controlled\u00a0later in the program.<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">void loop() { \r\n  for(int value = 0; value &lt; 255; value += 1) {\r\n    for(int i = 0; i &lt; NUM_LEDS; i++) {\r\n      leds&#x5B;i] = CHSV(value, 128, 255);\r\n    }\r\n    FastLED.show();\r\n    delay(10);\r\n  }\r\n}<\/pre>\n<p>In the final piece of code I have two loops, the outer loop loops over the hue of the LED&#8217;s and the inner loops over every LED.<\/p>\n<p>The Inner loop is used to loop over every LED and set them to the same value. Once they are all set the FastLED library is called with the function <code>show<\/code>. This sends out a message to update the LED&#8217;s with the changes made.<\/p>\n<p>Once this is done I wait 10 milliseconds and increase the hue in the first loop. Each time the hue loop is run the hue value is increased by one.<\/p>\n<p>By increasing the hue slowly the LED&#8217;s loop over a wide range of colours producing an interesting effect (shown below).<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1270\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/current_image0019\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0019.png?fit=293%2C164&amp;ssl=1\" data-orig-size=\"293,164\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"current_image0019\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0019.png?fit=293%2C164&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0019.png?fit=293%2C164&amp;ssl=1\" class=\"size-full wp-image-1270 alignleft\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0019.png?resize=293%2C164\" alt=\"\" width=\"293\" height=\"164\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0019.png?w=293&amp;ssl=1 293w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0019.png?resize=50%2C28&amp;ssl=1 50w\" sizes=\"auto, (max-width: 293px) 100vw, 293px\" \/> <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1269\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/current_image0014\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0014.png?fit=293%2C164&amp;ssl=1\" data-orig-size=\"293,164\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"current_image0014\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0014.png?fit=293%2C164&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0014.png?fit=293%2C164&amp;ssl=1\" class=\"size-full wp-image-1269 alignleft\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0014.png?resize=293%2C164\" alt=\"\" width=\"293\" height=\"164\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0014.png?w=293&amp;ssl=1 293w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0014.png?resize=50%2C28&amp;ssl=1 50w\" sizes=\"auto, (max-width: 293px) 100vw, 293px\" \/> <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1268\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/current_image0006\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0006.png?fit=293%2C164&amp;ssl=1\" data-orig-size=\"293,164\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"current_image0006\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0006.png?fit=293%2C164&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0006.png?fit=293%2C164&amp;ssl=1\" class=\"size-full wp-image-1268 alignleft\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0006.png?resize=293%2C164\" alt=\"\" width=\"293\" height=\"164\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0006.png?w=293&amp;ssl=1 293w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0006.png?resize=50%2C28&amp;ssl=1 50w\" sizes=\"auto, (max-width: 293px) 100vw, 293px\" \/> <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1267\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/current_image0001\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0001.png?fit=293%2C164&amp;ssl=1\" data-orig-size=\"293,164\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"current_image0001\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0001.png?fit=293%2C164&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0001.png?fit=293%2C164&amp;ssl=1\" class=\"size-full wp-image-1267 alignleft\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0001.png?resize=293%2C164\" alt=\"\" width=\"293\" height=\"164\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0001.png?w=293&amp;ssl=1 293w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0001.png?resize=50%2C28&amp;ssl=1 50w\" sizes=\"auto, (max-width: 293px) 100vw, 293px\" \/> <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1266\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/current_image0032\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0032.png?fit=293%2C164&amp;ssl=1\" data-orig-size=\"293,164\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"current_image0032\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0032.png?fit=293%2C164&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0032.png?fit=293%2C164&amp;ssl=1\" class=\"size-full wp-image-1266 alignleft\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0032.png?resize=293%2C164\" alt=\"\" width=\"293\" height=\"164\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0032.png?w=293&amp;ssl=1 293w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0032.png?resize=50%2C28&amp;ssl=1 50w\" sizes=\"auto, (max-width: 293px) 100vw, 293px\" \/> <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1265\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1260\/individually-addressable-ws2812b-full-color-led-strip-code-examples-and-review\/current_image0026\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0026.png?fit=293%2C164&amp;ssl=1\" data-orig-size=\"293,164\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"current_image0026\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0026.png?fit=293%2C164&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0026.png?fit=293%2C164&amp;ssl=1\" class=\"alignleft size-full wp-image-1265\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0026.png?resize=293%2C164\" alt=\"\" width=\"293\" height=\"164\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0026.png?w=293&amp;ssl=1 293w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/current_image0026.png?resize=50%2C28&amp;ssl=1 50w\" sizes=\"auto, (max-width: 293px) 100vw, 293px\" \/><\/p>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2>Final Review<\/h2>\n<p>The fact that this LED strip has individually addressable RGB LED&#8217;s with a well supported Arduino Library makes it very useful.<\/p>\n<p>Since the library is relatively expressive it allows simple to very complex patterns to be programmed in. In the above example, I have shown a simple colour changing program. In the future, I will code some more interesting patterns to share them.<\/p>\n<p>I would definitely, and am looking to, buy more of this in the future due to the wide range of uses.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I review an\u00a0individually addressable WS2812B Full Color LED strip and provide some code examples.<\/p>\n","protected":false},"author":1,"featured_media":1273,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Reviewing the Individually Addressable #WS2812B Full Color LED strip Code with the #Arduino including full code examples","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[97],"tags":[273,132,176,272,271],"class_list":["post-1260","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics","tag-addressable-led-strip","tag-arduino","tag-led","tag-led-strip","tag-ws2812b"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/addressable_strip_post_icon.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-kk","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2514,"url":"https:\/\/chewett.co.uk\/blog\/2514\/ws2812b-8x8-led-matrix-panel-review-and-code\/","url_meta":{"origin":1260,"position":0},"title":"WS2812B 8&#215;8 LED Matrix Panel Review and Code","author":"Chewett","date":"May 8, 2021","format":false,"excerpt":"This post talks about how you can use the WS2812B 8x8 LED Matrix Panel with an Arduino. WS2812B 8x8 LED Matrix Panel The WS2812B 8x8 LED Matrix Panel is an square arrangement of 64 RGB LED's. Each LED has its own LED driver which allows you to individually address and\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2520,"url":"https:\/\/chewett.co.uk\/blog\/2520\/junlinto-45mm-push-arcade-button-12v-power-led-for-arduino-review-and-code\/","url_meta":{"origin":1260,"position":1},"title":"Junlinto 45mm Push Arcade Button 12V Power LED For Arduino Review and Code","author":"Chewett","date":"August 1, 2020","format":false,"excerpt":"This post talks about how you can use the Junlinto 45mm Push Arcade Button 12V Power LED with an Arduino. Junlinto 45mm Push Arcade Button 12V Power LED This 45mm push button is a relatively standard button for an arcade machine. Inside of the button is a white LED which\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/06\/Junlinto-45mm-Push-Arcade-Button-12V-Power-LED_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/06\/Junlinto-45mm-Push-Arcade-Button-12V-Power-LED_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/06\/Junlinto-45mm-Push-Arcade-Button-12V-Power-LED_post_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/06\/Junlinto-45mm-Push-Arcade-Button-12V-Power-LED_post_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":689,"url":"https:\/\/chewett.co.uk\/blog\/689\/common-cathode-rgb-led-review-code-examples\/","url_meta":{"origin":1260,"position":2},"title":"Common Cathode RGB LED Review and Code examples","author":"Chewett","date":"October 7, 2017","format":false,"excerpt":"Today I am reviewing a basic RGB LED. This includes schematics for using it with an Arduino and code examples. What can the RGB Light Emitting Diode Do The RGB common cathode light emitting diode works just like a standard LED but there is one small difference. Instead of having\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/post_icon_rgb.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/post_icon_rgb.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/post_icon_rgb.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/post_icon_rgb.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":714,"url":"https:\/\/chewett.co.uk\/blog\/714\/magnetic-reed-switch-sensor-module-review-and-code-examples\/","url_meta":{"origin":1260,"position":3},"title":"Magnetic Reed Switch Sensor Module Review and code examples","author":"Chewett","date":"September 8, 2018","format":false,"excerpt":"This post reviews a\u00a0magnetic reed switch sensor module. There are many of these available on the internet and all\u00a0work similarly using a basic reed switch. Here I review and test the sensor and provide code to use it. Overview of the Magnetic Reed Switch sensor The magnetic reed switch Arduino\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":724,"url":"https:\/\/chewett.co.uk\/blog\/724\/sw-420-motion-vibration-sensor-review-code-examples\/","url_meta":{"origin":1260,"position":4},"title":"SW-420 Motion Vibration Sensor Review and code examples","author":"Chewett","date":"October 25, 2017","format":false,"excerpt":"This post reviews the SW-420 motion vibration sensor. Here I review, test and provide code to use the sensor. Overview of the Vibration Sensor This motion vibration sensor detects small movements and reports this back as a digital signal. This digital signal represents whether there is motion above the configured\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":959,"url":"https:\/\/chewett.co.uk\/blog\/959\/review-arduino-starter-kit\/","url_meta":{"origin":1260,"position":5},"title":"Review of the Arduino Starter Kit","author":"Chewett","date":"January 6, 2018","format":false,"excerpt":"This post reviews the Arduino Starter Kit. This is an ideal kit for a beginner in electronics and embedded systems or for someone wanting to learn how work with an Arduino. Here I look over what you get in the kit and the projects it provides. Arduino\/Genuino Starter Kit The\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/01\/review_of_starter_kit_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/01\/review_of_starter_kit_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/01\/review_of_starter_kit_post_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/01\/review_of_starter_kit_post_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1260"}],"version-history":[{"count":5,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1260\/revisions"}],"predecessor-version":[{"id":1278,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1260\/revisions\/1278"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/1273"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}