View: 2012|Reply: 1

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

23

Threads

223

Posts

814

Credits

Senior member

Rank: 4

Credits
814
Post time 2021-2-4 17:16:48 | Show all posts
Please send us a detailed description of the problem you encountered by email (including which product you bought, description of the problem, and picture provided): support@adeept.com
Reply

Use magic Report

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

Points Rules