<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Compare the Infineon RGB libraries that spawned from the Internet of Holiday Lights</title><link>https://community.element14.com/products/arduino/w/documents/18554/compare-the-infineon-rgb-libraries-that-spawned-from-the-internet-of-holiday-lights</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Compare the Infineon RGB libraries that spawned from the Internet of Holiday Lights</title><link>https://community.element14.com/products/arduino/w/documents/18554/compare-the-infineon-rgb-libraries-that-spawned-from-the-internet-of-holiday-lights</link><pubDate>Fri, 08 Oct 2021 08:12:35 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:06a92d13-90c8-420e-a1e8-c57789466d02</guid><dc:creator>Jan Cumps</dc:creator><comments>https://community.element14.com/products/arduino/w/documents/18554/compare-the-infineon-rgb-libraries-that-spawned-from-the-internet-of-holiday-lights#comments</comments><description>Current Revision posted to Documents by Jan Cumps on 10/8/2021 8:12:35 AM&lt;br /&gt;
&lt;p style="margin:0;"&gt;The &lt;a class="jive-link-external-small" href="/products/arduino/w/documents/17857/internet-of-holiday-lights-competitors" target="_blank"&gt;Internet of Holiday Lights RoadTest Plus&lt;/a&gt; has generated at least three libraries for the &lt;a class="jive-link-external-small" href="http://www.element14.com/community/docs/DOC-70582/l/infineon-lighting-rgb-led-arduino-shield?ICID=Arduino-Featured_Product" target="_blank"&gt;Infineon RGB LED Driver Board&lt;/a&gt;.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="/members/peteroakes"&gt;Robert Peter Oakes&lt;/a&gt;&lt;/span&gt; lib: &lt;a class="jive-link-blog-small" href="/products/arduino/b/blog/posts/byob-party-3-infineon-library-available"&gt;BYOB Party #3, Infineon Library Available&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="/members/ipv1"&gt;ipv1&lt;/a&gt;&lt;/span&gt; lib: &lt;a class="jive-link-blog-small" href="/products/arduino/b/blog/posts/dynamic-living-room-lights-the-infineon-rgb-led-shield--library"&gt;[Dynamic Living-Room Lights] The Infineon RGB LED Shield -Library!&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a class="jive-link-profile-small jiveTT-hover-user" href="https://www.element14.com/community/people/beavertank"&gt;beavertank&lt;/a&gt; lib: &lt;a class="jive-link-blog-small" href="/products/arduino/b/blog/posts/iot-christmas-ornaments---the-software-part-1"&gt;IoT Christmas Ornaments - The Software, Part 1&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;I&amp;#39;ve tried &lt;span&gt;&lt;a href="/members/peteroakes"&gt;Robert Peter Oakes&lt;/a&gt;&lt;/span&gt;&amp;#39;s library, but I&amp;#39;d like to run all of them and check if there&amp;#39;s something to learn out of it. It would be great to find out that the same problem is solved in more than one inventive way.&lt;/p&gt;&lt;p style="margin:0;"&gt;It&amp;#39;s a working document. Feel free to join.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/639x452/__key/communityserver-wikis-components-files/00-00-00-02-65/contentimage_5F00_76969.png"&gt;&lt;img alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/02/65/contentimage_76969.png-639x452.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=5r5JRAnsnnUpjUfBlI8ljJbCXhFr7w5vMwc%2B0C1UyrE%3D&amp;amp;se=2026-09-19T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=OqjY1RDUwZiE8vP4XDyM4Q==" style="max-height: 452px;max-width: 639px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:8pt;"&gt;photo is &lt;/span&gt;&lt;a class="jive-link-external-small" href="http://www.infineon.com/cms/dgdl/Infineon-Board_Manual_-_XMC1202_-_RGB_LED_Lighting_Shield_with_XMC1202_for_Arduino_-_v1_0-UM-v01_00-EN.pdf?fileId=5546d46249be182c0149ccca3860734d" rel="nofollow ugc noopener" target="_blank"&gt;&lt;span style="font-size:8pt;"&gt;from the Board Manual&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;table border="1" class="jiveBorder" style="border:1px solid #000000;width:100%;"&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style="border:1px solid black;border:1px solid #000000;padding:2px;color:#ffffff;background-color:#6690bc;text-align:center;" valign="middle"&gt;&lt;p style="margin:0;"&gt;&lt;a class="jive-link-profile-small jiveTT-hover-user" href="/members/peteroakes"&gt;&lt;span style="color:#ffffff;"&gt;peteroakes&lt;/span&gt;&lt;/a&gt; &amp;#39; library&lt;/p&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;Peter published his library here: &lt;/span&gt;&lt;a class="jive-link-blog-small" href="/products/arduino/b/blog/posts/byob-party-3-infineon-library-available"&gt;BYOB Party #3, Infineon Library Available&lt;/a&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;. The library is attached as a zip file to the post.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;Installation is as simple as placing his .cpp and .h in the right location.I used the libraries\Infineon subfolder of my Sketchbook location, as suggested by Peter.&lt;/p&gt;&lt;p style="margin:0;"&gt;(You can find your own Sketchbook location by using the File -&amp;gt; Preferences menu. The folder is shown under the &amp;#39;Sketchbook location:&amp;#39; label.)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;h4&gt;API:&lt;/h4&gt;&lt;p style="margin:0;"&gt;The functionality is wrapped in an class called &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;Infineon&lt;/span&gt;. There&amp;#39;s one constructor that doesn&amp;#39;t take parameters.&lt;/p&gt;&lt;p style="margin:0;"&gt;There&amp;#39;s an easy to use method &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SETCOLOUR()&lt;/span&gt; that does the obvious - it sets a particular colour. The library pre-defines a number of colours.&lt;br /&gt;You get yellow by calling &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SETCOLOUR(Yellow)&lt;/span&gt;&lt;span style="font-size:10pt;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;"&gt;The library has lower level functions to initialize the shield and to call all the commands that are supported by its i2c interface.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;"&gt;You can set any RGB colour&amp;nbsp; by invoking &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;I2CWRITE6BYTES(ADDRESS, INTENSITY_RGB, 0x..., 0x0..., 0x0...)&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;p style="margin:0;"&gt;You&amp;#39;ll find the RGBLED.ino example in the same blog post. The example shows object creation, shield setup and a colour show.&lt;/p&gt;&lt;p style="margin:0;"&gt;It explains how to set limits, rates and levels, ...&lt;/p&gt;&lt;p style="margin:0;"&gt;a few highlights:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  // ...
  RGBLEDS.I2CWRITE2BYTES (ADDRESS, FADERATE, 0x0000); // Immediate fade
  RGBLEDS.I2CWRITE2BYTES (ADDRESS, DIMMINGLEVEL, 0x0000); // 0% brightness level
  RGBLEDS.I2CWRITE2BYTES (ADDRESS, OFFTIME_RED, 0x38); // Set off-time of red channel to 0x38
  RGBLEDS.I2CWRITE2BYTES (ADDRESS, OFFTIME_GREEN, 0x39); // Set off-time of green channel to 0x39
  // ...
    RGBLEDS.I2CWRITE6BYTES (ADDRESS, CURRENT_RGB, 0x80, 0x80, 0x80); // Set current of red channel to 0x80 = 780mA
    RGBLEDS.I2CWRITE2BYTES (ADDRESS, FADERATE, 0x0000); // Fade Rate between intensities --&amp;gt; 0.0s
    RGBLEDS.I2CWRITE2BYTES (ADDRESS, WALKTIME, 0x0000); // walk time between colors = 0s
  // ...
    RGBLEDS.I2CWRITE6BYTES (ADDRESS, INTENSITY_RGB, 0x0555, 0x0555, 0x0555); // low level White Light
    RGBLEDS.I2CWRITE2BYTES (ADDRESS, DIMMINGLEVEL, 0x0FFF); // Maximum dimming level means inensity settings are directly used




  // ...
  // change lamp colour to green
  RGBLEDS.I2CWRITE6BYTES(ADDRESS, INTENSITY_RGB, 0x03ff, 0x03FF, 0x03FF); // 25%
  // ...
  RGBLEDS.SETCOLOUR( White);
  // ...&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;h4&gt;Getting started:&lt;/h4&gt;&lt;p style="margin:0;"&gt;Easy. I followed the setup instructions and the shield worked right away with the example.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Sketch size:&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#800080;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;Sketch uses 4,794 bytes (14%) of program storage space. Maximum is 32,256 bytes.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#800080;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;Global variables use 404 bytes (19%) of dynamic memory, leaving 1,644 bytes for local variables. Maximum is 2,048 bytes.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Tested with this minimal program that does the setup and calls the method&amp;nbsp; RGBLEDS.SETCOLOUR().&lt;/p&gt;&lt;p style="margin:0;"&gt;That takes care that the library&amp;#39;s main functions are all linked in.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  #include &amp;lt;Wire.h&amp;gt;
  #include &amp;quot;Infineon.h&amp;quot;



  Infineon RGBLEDS = Infineon();

void setup() {


    Wire.begin();
    while (RGBLEDS.on != 1) // Wait for shield to respond, keep setting the values till it does
    {

      RGBLEDS.I2CWRITE2BYTES (ADDRESS, FADERATE, 0x0000); // Immediate fade
      RGBLEDS.I2CWRITE2BYTES (ADDRESS, DIMMINGLEVEL, 0x0000); // 0% brightness level
      RGBLEDS.on = RGBLEDS.I2CREAD(ADDRESS, READ_DIMMINGLEVEL); // Request for brightness level
      if (RGBLEDS.message == 1 &amp;amp;&amp;amp; RGBLEDS.on == 0) // If message received and dimming level = 0%, &amp;quot;message&amp;quot; is set in the I2CREAD function
      {
        RGBLEDS.message = 0;
        RGBLEDS.on = 1; // break out of loop
      }
    }
    RGBLEDS.I2CWRITE2BYTES (ADDRESS, OFFTIME_RED, 0x38); // Set off-time of red channel to 0x38
    RGBLEDS.I2CWRITE2BYTES (ADDRESS, OFFTIME_GREEN, 0x38); // Set off-time of green channel to 0x39
    RGBLEDS.I2CWRITE2BYTES (ADDRESS, OFFTIME_BLUE, 0x38); // Set off-time of blue channel to 0x38
    RGBLEDS.I2CWRITE6BYTES (ADDRESS, CURRENT_RGB, 0x01, 0x01, 0x01); // max:  0x80 = 780mA, I need 15 for standard leds, (0x03), but dimmed down to 0x02 because that&amp;#39;s enough as max
    RGBLEDS.I2CWRITE2BYTES (ADDRESS, FADERATE, 0x0000); // Fade Rate between intensities --&amp;gt; 0.0s
    RGBLEDS.I2CWRITE2BYTES (ADDRESS, WALKTIME, 0x0000); // walk time between colors = 0s
    RGBLEDS.I2CWRITE6BYTES (ADDRESS, INTENSITY_RGB, 0x0555, 0x0555, 0x0555); // low level White Light
    RGBLEDS.I2CWRITE2BYTES (ADDRESS, DIMMINGLEVEL, 0x0FFF); // Maximum dimming level means inensity settings are directly used
    RGBLEDS.SETCOLOUR( White);


}

  // the loop routine runs over and over again forever:
  void loop() {
  }&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;table border="1" class="jiveBorder" style="border:1px solid #000000;width:100%;"&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style="border:1px solid black;border:1px solid #000000;padding:2px;color:#ffffff;background-color:#6690bc;text-align:center;" valign="middle"&gt;&lt;p style="margin:0;"&gt;&lt;a class="jive-link-profile-small jiveTT-hover-user" href="/members/ipv1"&gt;&lt;span style="color:#ffffff;"&gt;ipv1&lt;/span&gt;&lt;/a&gt; &amp;#39; library&lt;/p&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;Inderpreet published his library here &lt;a class="jive-link-blog-small" href="/products/arduino/b/blog/posts/dynamic-living-room-lights-the-infineon-rgb-led-shield--library"&gt;[Dynamic Living-Room Lights] The Infineon RGB LED Shield -Library!&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;. The library is available on his github.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;Installation is as simple as extracting that github folder&amp;#39;s zip in the right location.I used the libraries subfolder of my Sketchbook location, as suggested by Inderpreet. That will create subdirectory infineonrgb_shield-master&lt;/p&gt;&lt;p style="margin:0;"&gt;(You can find your own Sketchbook location by using the File -&amp;gt; Preferences menu. The folder is shown under the &amp;#39;Sketchbook location:&amp;#39; label.)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;h4&gt;API:&lt;/h4&gt;&lt;p style="margin:0;"&gt;The functionality is wrapped in an class called InfineonRGB. There&amp;#39;s one constructor that doesn&amp;#39;t take parameters.&lt;/p&gt;&lt;p style="margin:0;"&gt;The &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;begin()&lt;/span&gt; method sets a number of parameters to a default value for the library. These values can be changed before the LEDs are activated the first time.&lt;/p&gt;&lt;p style="margin:0;"&gt;Here&amp;#39;s an overview of the parameters after you called &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;begin()&lt;/span&gt;:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  I2CWRITE2BYTES (ADDRESS, OFFTIME_RED, 0x38); // Set off-time of red channel to 0x38
  I2CWRITE2BYTES (ADDRESS, OFFTIME_GREEN, 0x39); // Set off-time of green channel to 0x39
  I2CWRITE2BYTES (ADDRESS, OFFTIME_BLUE, 0x38); // Set off-time of blue channel to 0x38
  I2CWRITE2BYTES (ADDRESS, CURRENT_RED, 0x15); // Set current intensity of red channel to 0x15
  I2CWRITE2BYTES (ADDRESS, CURRENT_GREEN, 0x15); // Set current intensity of green channel to 0x15
  I2CWRITE2BYTES (ADDRESS, CURRENT_BLUE, 0x15); // Set current intensity of blue channel to 0x15
  I2CWRITE2BYTES (ADDRESS, DIMMINGLEVEL, 0x0000);&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;There&amp;#39;s a method for each of the functions supported by the shield.&lt;/p&gt;&lt;p style="margin:0;"&gt;For the intensity, there is a function that can set the intensity of all three channels in one call, and there&amp;#39;s also a separate function for each of the three channels.&lt;/p&gt;&lt;p style="margin:0;"&gt;This library also has a &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;setColor()&lt;/span&gt; method that translates a given set of colours to the right RGB values.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;p style="margin:0;"&gt;You&amp;#39;ll find the lamptest.ino example in your IDE under menu File -&amp;gt; Examples -&amp;gt; infineonrgb_shield-master. The example shows object creation and a colour show.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Warning: the example sets all three channels to full brightness at the setup. The current limits are set to 15 in the begin() method of the library - you need to check the library&amp;#39;s source code to see that. Take care to call his library&amp;#39;s methods to set the limits to your LED&amp;#39;s specifications..&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;The example sets the LEDs to full brightness at startup, then runs trough a number of different colours and intensities.&lt;/p&gt;&lt;p style="margin:0;"&gt;a few highlights:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  LEDS.begin(); // Cycle and set everything to zero.
  LEDS.SetDimmingLevel(0x0FFF); // Maximum Brightness
  // ...
  // Set RED
  LEDS.SetIntensityRGB(0x0FFF, 0x0000, 0x0000);
  // You can set the colors as well to White, Silver, Gray, Black, Red, Maroon, Yellow, Olive, Lime, Green, Aqua, Teal, Blue, Navy, Fuchsia, Purple
  // ...
  LEDS.SetColor(Fuchsia);
  // ...&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;h4&gt;Getting started:&lt;/h4&gt;&lt;p style="margin:0;"&gt;Easy. I followed the setup instructions and the example compiled right away. Just be careful with the default current limit set inside the library.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Sketch size:&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#800080;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;Sketch uses 3,916 bytes (12%) of program storage space. Maximum is 32,256 bytes.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#800080;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;Global variables use 281 bytes (13%) of dynamic memory, leaving 1,767 bytes for local variables. Maximum is 2,048 bytes.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;Tested with this minimal program that keeps the setup from the begin() method and calls the core methods.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;infineonrgb.h&amp;gt;
#include &amp;lt;Wire.h&amp;gt; // Include this in every new sketch.


InfineonRGB LEDS; // Create Object


void setup() {
  // put your setup code here, to run once:
  LEDS.begin(); // Cycle and set everything to zero.
  LEDS.SetDimmingLevel(0x0FFF); // Maximum Brightness
  LEDS.SetIntensityRGB(0x0FFF, 0x0000, 0x0000);
  LEDS.SetColor(Fuchsia);
}


void loop() {
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;table border="1" class="jiveBorder" style="border:1px solid #000000;width:100%;"&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style="border:1px solid black;border:1px solid #000000;padding:2px;color:#ffffff;background-color:#6690bc;text-align:center;" valign="middle"&gt;&lt;p style="margin:0;"&gt;&lt;a class="jive-link-profile-small jiveTT-hover-user" href="https://www.element14.com/community/people/beavertank"&gt;&lt;span style="color:#ffffff;"&gt;beavertank&lt;/span&gt;&lt;/a&gt; &amp;#39; library&lt;/p&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;Stephen published his library here: &lt;a class="jive-link-blog-small" href="/products/arduino/b/blog/posts/iot-christmas-ornaments---the-software-part-1"&gt;IoT Christmas Ornaments - The Software, Part 1&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;. The libraryfiles are attached as a zip file to the post.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;Installation is as simple as placing his .cpp and .h in the right location.I used the libraries\infineon_beavertank folder..&lt;/p&gt;&lt;p style="margin:0;"&gt;(You can find your own Sketchbook location by using the File -&amp;gt; Preferences menu. The folder is shown under the &amp;#39;Sketchbook location:&amp;#39; label.)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;h4&gt;API:&lt;/h4&gt;&lt;p style="margin:0;"&gt;Setting up the library is quite similar to Peter Oakes&amp;#39;. The constructor doesn&amp;#39;t make any pre-assumtions. You are expected to set up the parameters in your sketch. The API is clear and easy to understand.&lt;/p&gt;&lt;p style="margin:0;"&gt;There&amp;#39;s a function for each of the shields parameters, and there are the functions to set RGB, and each of Red, Green and Blue.&lt;/p&gt;&lt;p style="margin:0;"&gt;The main difference between Stephen&amp;#39;s lib and the other two is that it doesn&amp;#39;t have predefined colours. No big deal.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;p style="margin:0;"&gt;You&amp;#39;ll find the rgbshield_test.ino example in the same blog post. The example shows object creation, shield setup and a colour show.&lt;/p&gt;&lt;p style="margin:0;"&gt;It explains how to set limits, rates and levels, ...&lt;/p&gt;&lt;p style="margin:0;"&gt;a few highlights:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    while (RGB.on != 1) // Wait for shield to respond, keep setting the values till it does
    {
      RGB.setfade (0x0000); // Immediate fade
      RGB.setbrightness (0x0000); // 0% brightness level
      RGB.on = RGB.readbrightness(); // Request for brightness level
      if (RGB.message == 1 &amp;amp;&amp;amp; RGB.on == 0) // If message received and dimming level = 0%, &amp;quot;message&amp;quot; is set in the I2CREAD function
      {
        RGB.message = 0;
        RGB.on = 1; // break out of loop
      }
    }

    RGB.I2CWRITE2BYTES (ADDRESS, OFFTIME_RED, 0x38); // Set off-time of red channel to 0x38 - good base value
    // ...
    RGB.I2CWRITE6BYTES (ADDRESS, CURRENT_RGB, 0x80, 0x80, 0x80); // Set current of red channel to 0x80 = 780mA - maximum safe current!
    RGB.setfade (0x002C); // Fade Rate between intensities
    RGB.setwalktime (250); // walk time between colors = (value)*0.01024 seconds = (here) 2s
    RGB.setrgb (0x0555, 0x0555, 0x0555); // low level White Light - indicates initialization is finished
    RGB.setbrightness (0x555); //Maximum brightness means intensity levels are used directly



    // ...
    //Set full green
  RGB.setrgb(0x000,0xFFF,0x000);
  //Pause until green reaches desired level
  while(gout != 0xFFF)
  {
   gout = RGB.readgreen();
  }
   // ...


    //Set half red half green
  RGB.setrgb(0x555,0x555,0x000);
    //Pause until green and red reach desired levels
  while(gout != 0x555 &amp;amp;&amp;amp; rout!=0x555)
  {
   gout = RGB.readgreen();
   rout = RGB.readred();
  }&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;h4&gt;Getting started:&lt;/h4&gt;&lt;p style="margin:0;"&gt;Easy. I followed the setup instructions and the example compiled right away.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;padding:2px;"&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Sketch size:&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#800080;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;Sketch uses 5,846 bytes (18%) of program storage space. Maximum is 32,256 bytes.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#800080;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;Global variables use 404 bytes (19%) of dynamic memory, leaving 1,644 bytes for local variables. Maximum is 2,048 bytes.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Tested with this minimal program that does the setup and calls the methods&amp;nbsp; setXXX) and readXXX().&lt;/p&gt;&lt;p style="margin:0;"&gt;That takes care that the library&amp;#39;s main functions are all linked in.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;quot;rgbshield.h&amp;quot;
#include &amp;lt;Wire.h&amp;gt;


rgbshield RGB = rgbshield();


void setup()
{
    Wire.begin();

    while (RGB.on != 1) // Wait for shield to respond, keep setting the values till it does
    {
      RGB.setfade (0x0000); // Immediate fade
      RGB.setbrightness (0x0000); // 0% brightness level
      RGB.on = RGB.readbrightness(); // Request for brightness level
      if (RGB.message == 1 &amp;amp;&amp;amp; RGB.on == 0) // If message received and dimming level = 0%, &amp;quot;message&amp;quot; is set in the I2CREAD function
      {
        RGB.message = 0;
        RGB.on = 1; // break out of loop
      }
    }

    RGB.I2CWRITE2BYTES (ADDRESS, OFFTIME_RED, 0x38); // Set off-time of red channel to 0x38 - good base value
    RGB.I2CWRITE2BYTES (ADDRESS, OFFTIME_GREEN, 0x39); // Set off-time of green channel to 0x39 - good base value
    RGB.I2CWRITE2BYTES (ADDRESS, OFFTIME_BLUE, 0x38); // Set off-time of blue channel to 0x38 - good base value
    RGB.I2CWRITE6BYTES (ADDRESS, CURRENT_RGB, 0x80, 0x80, 0x80); // Set current of red channel to 0x80 = 780mA - maximum safe current!
    RGB.setfade (0x002C); // Fade Rate between intensities
    RGB.setwalktime (250); // walk time between colors = (value)*0.01024 seconds = (here) 2s
    RGB.setrgb (0x0555, 0x0555, 0x0555); // low level White Light - indicates initialization is finished
    RGB.setbrightness (0x555); //Maximum brightness means intensity levels are used directly


  unsigned int rout = 0;
  unsigned int gout = 0;
  unsigned int bout = 0;


    //Set full green
  RGB.setrgb(0x000,0xFFF,0x000);
  RGB.setred(0x000);
  RGB.setgreen(0x000);
  RGB.setblue(0x000);
   gout = RGB.readgreen();
   rout = RGB.readred();
   bout = RGB.readblue();


}


void loop()
{


}&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;It&amp;#39;s obvious from the review that all three libraries are easy to use. The differences between them are low.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;All three make the start easier than the example of the Infineon Quick Start Guide.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;And all allow you to use the important features of the board with a nice layer of abstraction and encapsulation.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;I used the libraries to get my device running before I fully understood the shield.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;table border="1" class="jiveBorder" style="border:1px solid #000000;width:100%;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border:1px solid #000000;background-color:#ffff99;padding:2px;"&gt;&lt;p style="margin:0;"&gt;That is my prefered way of learning.&lt;/p&gt;&lt;p style="margin:0;"&gt;I prefer having a working example that I can probe and play with, and dig into the details and principles behind it while having it on the bench. I&amp;#39;m quite poor at reading datasheets without having a running example.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;Once you have the shield working with one of the three libraries, it&amp;#39;s a good time to step a level down and look at the Infineon example and the explanation of the shields operation. &lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;Next step may be to try and understand the on-board controller.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;That&amp;#39;s the end game of the board. It&amp;#39;s there to drag you into Infineon&amp;#39;s XMC1200 processor family and its LED driver module. Once you get to know how to use it with the Arduino, this is a great step to try and plug in a programmer and get the board working on its own.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;A good starting point is &lt;span&gt;&lt;a href="/members/shabaz"&gt;shabaz&lt;/a&gt;&lt;/span&gt; &amp;#39;s &lt;a class="jive-link-blog-small" href="/products/arduino/b/blog/posts/rgb-led-shield-from-infineon---getting-started-guide"&gt;RGB LED Shield from Infineon - Getting Started Guide&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: infineon, iot_holidaylights, led, rgb, shield&lt;/div&gt;
</description></item></channel></rss>