CPX simulator ambient color value

Microsoft's MakeCode platform for easy blocks-style programming

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Rick314
 
Posts: 10
Joined: Wed Sep 22, 2021 6:00 pm

CPX simulator ambient color value

Post by Rick314 »

Start with the following program:
MakeCode_CPX_ambient_color_1.png
MakeCode_CPX_ambient_color_1.png (66.84 KiB) Viewed 743 times
View the simulator console. As light intensity is varied using the upper-left control, the color changes:
MakeCode_CPX_ambient_color_2.png
MakeCode_CPX_ambient_color_2.png (4.83 KiB) Viewed 743 times
Eventually all 5 possible color values can be seen: 16711680 = 0xff0000 = red; 65280 = 0x00ff00 = green; 255 = 0x0000ff = blue; 16776960 = 0xffff00 = yellow; 16777215 = 0xffffff = white. But the color value seems to change randomly.
Is the color value really random, or is there some way to set it to each of the 5 possible values?

User avatar
Rick314
 
Posts: 10
Joined: Wed Sep 22, 2021 6:00 pm

Re: CPX simulator ambient color value

Post by Rick314 »

Rick314 wrote:Is the color value really random, or is there some way to set it to each of the 5 possible values?
https://www.adafruit.com/support points to these forums as the best way to get technical questions answered by Adafruit Support people. I understand these are busy times, but is there a better way to get questions like this one answered?

User avatar
Rick314
 
Posts: 10
Joined: Wed Sep 22, 2021 6:00 pm

Re: CPX simulator ambient color value

Post by Rick314 »

Is the CPX simulator ambient color value random, or is there some way to set it to each of the 5 possible values?

Details are at the top of this forum topic. Is there a better way than this forum to communicate with Adafruit support? I started this topic 3 weeks ago and still hope to receive an answer from them.

User avatar
johnpark
 
Posts: 985
Joined: Wed Mar 25, 2009 2:15 pm

Re: CPX simulator ambient color value

Post by johnpark »

This is a good question to ask on forum.makecode.com

Locked
Please be positive and constructive with your questions and comments.

Return to “MakeCode”