hash-bang / Lightshow

LED light control program
5 stars 4 forks source link

"lightshow color white" actually turns the bulb blue #1

Closed brandon-dacrib closed 11 years ago

brandon-dacrib commented 11 years ago

The docs here state that the mode must be changed. http://www.limitlessled.com/dev/

27 00 55 – Mode Up 28 00 55 – Mode Down (There are 20 modes. The lowest is constant white)

I tried poking around the code on how to fix, but got confused on where the hex code to send is defined.

hash-bang commented 11 years ago

Well spotted. I'm sure I had this before. Oh well, fixed in latest patch.

brandon-dacrib commented 11 years ago

Awesome, thx and good job. Can I ask you something? I am trying to do something similar with ruby and I don't understand how the hex codes that represent colors are mapped. Did they just make up a numbering system to represent the colors? Right now I am bogged down in the details of converting numbers over 99 into hex values that it understands but who knows. https://github.com/brandon-dacrib/cloverleaf/blob/master/app/tests/limitlessled-rgb.rb

hash-bang commented 11 years ago

As far as I can tell I think they just nominated a section of the RGB spectrum and associated an INT with it. This does make sense as it means of the 255 possibilities (white isn't counted as a 'color') all of them can be pastels which are a bit easier on the eye.

I've been meaning to write a LED <-> Hex converter but I've yet to put my mind to it. There will be a mathematical formula to it but I've not yet had time to properly look at the issue.