Closed MrBreadWater closed 7 years ago
Yes, that is what I use.
Thanks!
On Mon, Jul 17, 2017 at 3:55 PM, Uriah Welcome notifications@github.com wrote:
Yes, that is what I use.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/OctoPrint-LEDStripControl/issues/9#issuecomment-315908541, or mute the thread https://github.com/notifications/unsubscribe-auth/AWeVKoyNKTC0Xlopmz139oUodXa0mYnCks5sO-ZcgaJpZM4OanG_ .
How do I close this issue...?
@precision Hey, sorry to bring this up again, but I'm having a bit of trouble making colors. Since it's common anode, everything is reversed. So 255 is actually 0, and vice versa. Is there a way to change this to be the opposite?
@precision actually, scratch that, something else is going on. Setting Blue to 255 will make blue, setting red to 255 makes red, etc, but I can't mix colors unless they are perfectly equal. If they aren't it will just be whichever color has a higher value, but the led will just be dimmer than normal.
That is odd. Few questions..
For some unknown reason, color mixing started working. But I still have the original problem of 255 being off and 0 being on.
@precision Ok, earlier I had read and blue swapped, and I had green set to the wrong pin altogether. That was why R255 would make red and b255 would make blue. Now R255 makes turquoise, and B255 makes yellow, and U255 makes pink/purple.
It seems like the problem is now the inversion. Simple to fix, however, I don't understand your code (I'm a python amateur) otherwise I would fix it myself. All you need to do is take whatever value it should be, and subtract it from 255. Would you be so kind as to send me a copy of the python with that change?
I think all you should have to do to invert the values is to change line 136 of init.py
try:
v = float(match.group(2))
except ValueError:
# more than likely match.group(2) was unspecified
v = 255.0
And just change it to
try:
v = 255.0 - float(match.group(2))
except ValueError:
# more than likely match.group(2) was unspecified
v = 0.0
Oh is that all? Well, in that case, that makes things much easier. Do you know where the file is stored? I can't find it.
On Thu, Oct 12, 2017 at 8:35 AM, Uriah Welcome notifications@github.com wrote:
I think all you should have to do to invert the values is to change line 136 of init.py
try: v = float(match.group(2)) except ValueError: # more than likely match.group(2) was unspecified v = 255.0
And just change it to
try: v = 255.0 - float(match.group(2)) except ValueError: # more than likely match.group(2) was unspecified v = 0.0
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/OctoPrint-LEDStripControl/issues/9#issuecomment-336175774, or mute the thread https://github.com/notifications/unsubscribe-auth/AWeVKjYTIOeS9mSqJvwSW5ThMpp8lwk2ks5srjHGgaJpZM4OanG_ .
Well assuming you're using Octopi it should be in
/home/pi/oprint/lib/python2.7/site-packages/octoprint_LEDStripControl/
Of not, basically the same path but where ever you put your virtualenv base.
Alright, I've changed it and it pretty much works. I just have to specify all the values, otherwise the led defaults to white. But other than that it works flawlessly.
On Thu, Oct 12, 2017 at 9:59 AM, Uriah Welcome notifications@github.com wrote:
Well assuming you're using Octopi it should be in
/home/pi/oprint/lib/python2.7/site-packages/octoprint_LEDStripControl/
Of not, basically the same path but where ever you put your virtualenv base.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/OctoPrint-LEDStripControl/issues/9#issuecomment-336199894, or mute the thread https://github.com/notifications/unsubscribe-auth/AWeVKuiGT-NsNYd4tCei0x1tzLtFv4Rnks5srkVpgaJpZM4OanG_ .
Thanks for all your help!
On Thu, Oct 12, 2017 at 9:59 AM, Uriah Welcome notifications@github.com wrote:
Well assuming you're using Octopi it should be in
/home/pi/oprint/lib/python2.7/site-packages/octoprint_LEDStripControl/
Of not, basically the same path but where ever you put your virtualenv base.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/OctoPrint-LEDStripControl/issues/9#issuecomment-336199894, or mute the thread https://github.com/notifications/unsubscribe-auth/AWeVKuiGT-NsNYd4tCei0x1tzLtFv4Rnks5srkVpgaJpZM4OanG_ .
Glad to hear!
Title says it all. Thanks for your help!