Arduino Programming – HSB to RGB

Control a RGB led with Hue, Saturation and Brightness (HSB / HSV ).

Control a RGB led with Hue, Saturation and Brightness (HSB / HSV ).

Level : beginner with Arduino. ( Basic knowledge of programming principles like if/else and variables ).

  • Dear Mr. Kasperman,

    on my website (http://macherzin.net) which is not a commercial one.I am just working on an article about the Arduino and Power-LEDs.

    I would like to use your code as an example with only a few technical changes (no poti but a loop variable instead …) and German comments.

    Because a do not see any licence- or copyright remarks in your sketch I would like to ask for your permission. Of course your name will be mentioned an there will be a link to your site.

    Here the link to the first part of the article:

    http://macherzin.net/tiki-read_article.php?articleId=28

    I would be glad to receive your permission.

    Best regards

    fribbe (Holger Lübkert)/Germany

  • Perfect!

  • mvadu

    Hello Kasper, I know this is very old post, but wanted your help to understand few things.

    1. The formula given y= round(pow( 2.0, x+64/40.0) – 1) seems to be missing few braces. It will reduce to y= round(pow( 2.0, x+1.6) – 1) as / takes precedence. Is that intended?
    2. What is the source of that formula. I want to understand how those values were selected, governed by what algorithm/law.
    Regards,
    Adarsha

  • mvadu

    Never mind, I found it in your library code’s comment.. For the benefit of others see the origin of the dim curve here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1174674545