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).

Buy Me a Coffee at ko-fi.comWas this article useful to you? Buy me a coffee!

4 thoughts on “Arduino Programming – HSB to RGB”

  1. Dear Mr. Kasperman,

    on my website ( 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:

    I would be glad to receive your permission.

    Best regards

    fribbe (Holger Lübkert)/Germany

  2. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.