View: 441|Reply: 0

Bug in Lesson 6- Controlling anRGB LEDwithPWM

[Copy link]

1

Threads

1

Posts

11

Credits

Newbie

Rank: 1

Credits
11
Post time 2019-2-25 19:44:15 | Show all posts |Read mode
Unless I'm mistaken, I think you'll find that these line of code in

https://github.com/adeept/Starte ... master/06_rgbLed.py

25    R_val = (col & 0x110000) >> 16
26    G_val = (col & 0x001100) >> 8
27    B_val = (col & 0x000011) >> 0


Should be:
25    R_val = (col & 0xFF0000) >> 16
26    G_val = (col & 0x00FF00) >> 8
27    B_val = (col & 0x0000FF) >> 0



[tr]        [/tr]



Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules